Beispiel #1
0
        public MasterPage(MasterMenuPage masterMenuPage, INavigationService navigationService)
        {
            InitializeComponent();
            this.navigationService = navigationService;

            MasterBehavior = MasterBehavior.Popover;

            this.NavigationPage = new NavigationPage();
            this.Detail         = this.NavigationPage;
            this.masterMenuPage = masterMenuPage;
            this.Master         = this.masterMenuPage;

            this.IsPresentedChanged += OnIsPresentedChanged;
        }
Beispiel #2
0
        //RootPage root;
        //List<HomeMenuItem> menuItems;

        public MenuPage(RootPage root)
        {
            /*this.root = root;
             * InitializeComponent();
             * BindingContext = new BaseViewModel(Navigation)
             * {
             *      Title = "XamarinCRM",
             *      Subtitle = "XamarinCRM",
             *      Icon = "slideout.png"
             * };
             *
             * ListViewMenu.ItemsSource = menuItems = new List<HomeMenuItem>
             *      {
             *      new HomeMenuItem { Title = "Contact", BottomBarMenu = BottomBarMenu.Contact, Icon ="contact.png" },
             *      new HomeMenuItem { Title = "About", BottomBarMenu = BottomBarMenu.About, Icon = "about.png" },
             *      new HomeMenuItem { Title = "Help", BottomBarMenu = BottomBarMenu.Help, Icon = "help.png" },
             *      new HomeMenuItem { Title = "Settings", BottomBarMenu = BottomBarMenu.Settings, Icon = "settings.png" },
             *
             *      };
             *
             * ListViewMenu.SelectedItem = menuItems[0];
             *
             * ListViewMenu.ItemSelected += async (sender, e) =>
             * {
             *      if (ListViewMenu.SelectedItem == null)
             *              return;
             *
             *      await this.root.NavigateAsync(((HomeMenuItem)e.SelectedItem).BottomBarMenu);
             * };*/

            var menuPage = new MasterMenuPage(); 
 menuPage.OnMenuTap = (page) =>

            {
                IsPresented = false; 
 Detail = new NavigationPage(page); 

            }; 

 Master = menuPage; 
 Detail = new NavigationPage(new HelpTab());
        }