Inheritance: ViewModelBase
示例#1
0
        public HomePage()
        {
            InitializeComponent ();
            Xamarin.Insights.Track ("Home");
            BindingContext = new HomeViewModel (this);
            ButtonFindStore.Clicked += (sender, e) =>
            {
                Navigation.PushAsync(new StoresPage());
            };

            ButtonLeaveFeedback.Clicked += (sender, e) =>
            {
                Navigation.PushAsync(new FeedbackPage());
            };
        }
示例#2
0
        public HomePage()
        {
            InitializeComponent ();
            BindingContext = new HomeViewModel (this);
            ButtonFindStore.Clicked += async (sender, e) =>
            {
                if (Device.Idiom == TargetIdiom.Tablet || Device.Idiom == TargetIdiom.Desktop)
                    await Navigation.PushAsync(new StoresTabletPage());
                else
                    await Navigation.PushAsync(new StoresPage());
            };

            if(Device.Idiom == TargetIdiom.Tablet)
            {
                HeroImage.Source = ImageSource.FromFile("herotablet.jpg");
            }

            ButtonLeaveFeedback.Clicked += async (sender, e) =>
            {
                await Navigation.PushAsync(new FeedbackPage());
            };
        }