cleaning thanks to Xaml code
This commit is contained in:
@ -1,44 +1,18 @@
|
||||
using BookAStar.Helpers;
|
||||
using BookAStar.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Input;
|
||||
using BookAStar.Model;
|
||||
using BookAStar.ViewModels;
|
||||
using Xamarin.Forms;
|
||||
using XLabs.Ioc;
|
||||
using XLabs.Platform.Services;
|
||||
|
||||
namespace BookAStar.Pages
|
||||
{
|
||||
|
||||
public partial class BookQueriesPage : ContentPage
|
||||
{
|
||||
public BookQueriesPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
BindingContext = DataManager.Current.BookQueries;
|
||||
}
|
||||
protected override void OnBindingContextChanged()
|
||||
{
|
||||
list.ItemsSource = BindingContext as ObservableCollection<BookQueryData>;
|
||||
base.OnBindingContextChanged();
|
||||
}
|
||||
|
||||
public RemoteEntity<BookQueryData,long> Queries
|
||||
{
|
||||
get
|
||||
{
|
||||
return BindingContext!=null? BindingContext as RemoteEntity<BookQueryData, long>:null;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnAppearing()
|
||||
{
|
||||
base.OnAppearing();
|
||||
if (Queries.CanExecute(null)) Queries.Execute(null);
|
||||
BindingContext = new BookQueriesViewModel();
|
||||
}
|
||||
|
||||
private void OnViewDetail(object sender, ItemTappedEventArgs e)
|
||||
|
Reference in New Issue
Block a user