cleaning thanks to Xaml code
This commit is contained in:
parent
6b68edfe7d
commit
613c8fbcd2
1 changed files with 4 additions and 30 deletions
|
|
@ -1,44 +1,18 @@
|
||||||
using BookAStar.Helpers;
|
using BookAStar.Model;
|
||||||
using BookAStar.Model;
|
using BookAStar.ViewModels;
|
||||||
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 Xamarin.Forms;
|
using Xamarin.Forms;
|
||||||
using XLabs.Ioc;
|
using XLabs.Ioc;
|
||||||
using XLabs.Platform.Services;
|
using XLabs.Platform.Services;
|
||||||
|
|
||||||
namespace BookAStar.Pages
|
namespace BookAStar.Pages
|
||||||
{
|
{
|
||||||
|
|
||||||
public partial class BookQueriesPage : ContentPage
|
public partial class BookQueriesPage : ContentPage
|
||||||
{
|
{
|
||||||
public BookQueriesPage()
|
public BookQueriesPage()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
BindingContext = new BookQueriesViewModel();
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnViewDetail(object sender, ItemTappedEventArgs e)
|
private void OnViewDetail(object sender, ItemTappedEventArgs e)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue