public StoresPage() { InitializeComponent(); Xamarin.Insights.Track("Stores"); BindingContext = viewModel = new StoresViewModel(this); StoreList.ItemSelected += (sender, e) => { if (StoreList.SelectedItem == null) { return; } Navigation.PushAsync(new StorePage(e.SelectedItem as Store)); StoreList.SelectedItem = null; }; if (Device.OS == TargetPlatform.WinPhone) { StoreList.IsGroupingEnabled = false; StoreList.ItemsSource = viewModel.Stores; } }
public StoresPage () { InitializeComponent (); Xamarin.Insights.Track ("Stores"); BindingContext = viewModel = new StoresViewModel (this); StoreList.ItemSelected += async (sender, e) => { if(StoreList.SelectedItem == null) return; var store = e.SelectedItem as Store; if (ItemSelected == null) { await Navigation.PushAsync(new StorePage(store)); StoreList.SelectedItem = null; } else { ItemSelected.Invoke(store); } }; if(Device.OS == TargetPlatform.WinPhone || (Device.OS == TargetPlatform.Windows && Device.Idiom == TargetIdiom.Phone)) { StoreList.IsGroupingEnabled = false; StoreList.ItemsSource = viewModel.Stores; } }
public StoresPage() { InitializeComponent(); Xamarin.Insights.Track("Stores"); BindingContext = viewModel = new StoresViewModel(this); StoreList.ItemSelected += async(sender, e) => { if (StoreList.SelectedItem == null) { return; } var store = e.SelectedItem as Store; if (ItemSelected == null) { await Navigation.PushAsync(new StorePage(store)); StoreList.SelectedItem = null; } else { ItemSelected.Invoke(store); } }; if (Device.OS == TargetPlatform.WinPhone || (Device.OS == TargetPlatform.Windows && Device.Idiom == TargetIdiom.Phone)) { StoreList.IsGroupingEnabled = false; StoreList.ItemsSource = viewModel.Stores; } }
public StoresPage() { InitializeComponent(); BindingContext = viewModel = new StoresViewModel(this); if (Device.OS == TargetPlatform.WinPhone || (Device.OS == TargetPlatform.Windows && Device.Idiom == TargetIdiom.Phone)) { //StoreList.IsGroupingEnabled = false; //StoreList.ItemsSource = viewModel.Stores; } }
public StoresPage() { InitializeComponent (); BindingContext = viewModel = new StoresViewModel (this); if(Device.OS == TargetPlatform.WinPhone || (Device.OS == TargetPlatform.Windows && Device.Idiom == TargetIdiom.Phone)) { //StoreList.IsGroupingEnabled = false; //StoreList.ItemsSource = viewModel.Stores; } }
public StoresPage() { InitializeComponent(); ((NavigationPage)Application.Current.MainPage).BarBackgroundColor = Color.Red; // ((NavigationPage)Application.Current.MainPage).BarBackgroundColor = Color.Black; BindingContext = viewModel = new StoresViewModel(this); //if (Device.RuntimePlatform == Device.WinPhone || (Device.RuntimePlatform == Device.UWP && Device.Idiom == TargetIdiom.Phone)) //{ // StoreList.IsGroupingEnabled = false; // StoreList.ItemsSource = viewModel.Stores; //} }
public StoresPage () { InitializeComponent (); BindingContext = viewModel = new StoresViewModel (this); viewModel.ForceSync = true; NewStore.Clicked += async (sender, e) => { await Navigation.PushAsync(new StorePage(null)); }; StoreList.ItemSelected += async (sender, e) => { if(StoreList.SelectedItem == null) return; await Navigation.PushAsync(new StorePage(e.SelectedItem as Store)); StoreList.SelectedItem = null; }; }
public StoresPage() { InitializeComponent (); Xamarin.Insights.Track ("Stores"); BindingContext = viewModel = new StoresViewModel (this); StoreList.ItemSelected += (sender, e) => { if(StoreList.SelectedItem == null) return; Navigation.PushAsync(new StorePage(e.SelectedItem as Store)); StoreList.SelectedItem = null; }; if(Device.OS == TargetPlatform.WinPhone) { StoreList.IsGroupingEnabled = false; StoreList.ItemsSource = viewModel.Stores; } }