Example #1
0
        public App()
        {
            current = this;
            InitializeComponent();
            ViewModelBase.Init();
            // The root page of your application
            switch (Device.OS)
            {
            case TargetPlatform.Android:
                MainPage = new RootPageAndroid();
                break;

            case TargetPlatform.iOS:
                MainPage = new EvolveNavigationPage(new RootPageiOS());
                break;

            case TargetPlatform.Windows:
            case TargetPlatform.WinPhone:
                MainPage = new RootPageWindows();
                break;

            default:
                throw new NotImplementedException();
            }
        }
        public MenuPage(RootPageAndroid root)
        {
            this.root = root;
            InitializeComponent();

            NavView.NavigationItemSelected += async(sender, e) =>
            {
                this.root.IsPresented = false;

                await Task.Delay(225);

                await this.root.NavigateAsync(e.Index);
            };
        }
Example #3
0
        public MenuPage(RootPageAndroid root)
        {
            this.root = root;
            InitializeComponent();

            NavView.NavigationItemSelected += (sender, e) =>
            {
                this.root.IsPresented = false;
                Device.StartTimer(TimeSpan.FromMilliseconds(300), () =>
                {
                    Device.BeginInvokeOnMainThread(async() =>
                    {
                        await this.root.NavigateAsync(e.Index);
                    });
                    return(false);
                });
            };
        }
Example #4
0
        public MenuPage(RootPageAndroid root)
        {
            this.root = root;
            InitializeComponent();

            NavView.NavigationItemSelected += (sender, e) =>
            {
                this.root.IsPresented = false;
                Device.StartTimer(TimeSpan.FromMilliseconds(300), ()=>
                {
                        Device.BeginInvokeOnMainThread(async () =>
                            {
                                await this.root.NavigateAsync(e.Index);
                            });
                    return false;
                });
            };
        }
Example #5
0
 public App(IDevice device)
 {
     current = this;
     InitializeComponent();
     ViewModelBase.Init();
     // The root page of your application
     switch (Device.OS)
     {
         case TargetPlatform.Android:
             MainPage = new RootPageAndroid(device);
             break;
         case TargetPlatform.iOS:
             MainPage = new EvolveNavigationPage(new RootPageiOS(device));
             break;
         case TargetPlatform.Windows:
         case TargetPlatform.WinPhone:
             MainPage = new RootPageWindows(device);
             break;
         default:
             throw new NotImplementedException();
     }
 }