コード例 #1
0
        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;
            }
        }
コード例 #2
0
        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;
			}
		}
コード例 #3
0
        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;
            }
        }
コード例 #4
0
        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;
            }
        }
コード例 #5
0
        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;
            }
        }
コード例 #6
0
        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;
            //}
        }
コード例 #7
0
		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;
			};
		}
コード例 #8
0
ファイル: StoresPage.xaml.cs プロジェクト: vkoppaka/MyShoppe
        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;
            }
        }