Ejemplo n.º 1
0
        NavigationPageBase CreateNavigationPage(string caption, PanelBase panel)
        {
            NavigationPageBase page = navigationFrame.CreateNewPage();

            page.Caption  = caption;
            panel.Parent  = page;
            panel.Dock    = DockStyle.Fill;
            panel.Padding = new Padding(1);
            panel.Paint  += (s, args) => ControlPaint.DrawBorder(args.Graphics, panel.Bounds,
                                                                 Color.FromArgb(200, 200, 200), ButtonBorderStyle.Solid);
            return(page);
        }
Ejemplo n.º 2
0
        private NavigationPage Initialise()
        {
            var bgScheduler = RxApp.TaskpoolScheduler;
            var mScheduler  = RxApp.MainThreadScheduler;
            var vLocator    = Locator.Current.GetService <IViewLocator>();

            var navigationView   = new NavigationPageBase(mScheduler, bgScheduler, vLocator);
            var viewStackService = new ViewStackService(navigationView);

            Locator.CurrentMutable.Register <IViewStackService>(() => viewStackService);
            navigationView.PushPage(new HomeScreenViewModel(), null, true, false).Subscribe();

            return(navigationView);
        }
Ejemplo n.º 3
0
        public NavigationPage InitNavigation(Func <IViewStackService, ITabViewModel> createViewModelFunc)
        {
            var bgScheduler = RxApp.TaskpoolScheduler;
            var mScheduler  = RxApp.MainThreadScheduler;
            var vLocator    = Locator.Current.GetService <IViewLocator>();

            var navigationView   = new NavigationPageBase(mScheduler, bgScheduler, vLocator);
            var viewStackService = new ViewStackService(navigationView);
            var model            = createViewModelFunc(viewStackService);

            navigationView.Title           = model.TabTitle;
            navigationView.IconImageSource = Device.RuntimePlatform == Device.UWP ? $"Assets/{model.TabIcon}" : model.TabIcon;

            navigationView.PushPage(model as ViewModelBase, null, true, false).Subscribe();
            return(navigationView);
        }
Ejemplo n.º 4
0
            public override void CommitPageTransaction(NavigationPageBase page)
            {
                var frame = _frames[((PageIndex)(page.PageIdentifier)).GetAssociatedStack()];

                frame.Content = page;
            }
Ejemplo n.º 5
0
 public override void CommitPageTransaction(NavigationPageBase page)
 {
     _rootFrame.Navigate(page.GetType());
 }