Example #1
0
        public SlideDownMenuPage()
        {
            Content = new StackLayout {
                VerticalOptions   = LayoutOptions.Center,
                HorizontalOptions = LayoutOptions.Center,
                Children          =
                {
                    new Label {
                        Text = "Click the button in top right"
                    }
                }
            };

            // You can add a ToolBar button to show the Menu.
            this.ToolbarItems.Add(new ToolbarItem {
                Command = new Command(() => {
                    if (this.SlideMenu.IsShown)
                    {
                        HideMenuAction?.Invoke();
                    }
                    else
                    {
                        ShowMenuAction?.Invoke();
                    }
                }),
                Icon     = "Settings.png",
                Text     = "Settings",
                Priority = 0
            });

            this.SlideMenu = new SlideDownMenuView();
        }
 private void Filter()
 {
     if (SlideMenu.IsShown)
     {
         HideMenuAction?.Invoke();
     }
     else
     {
         ShowMenuAction?.Invoke();
     }
 }
Example #3
0
 private void OnOpenMenu(MenuMessage message)
 {
     if (SlideMenu.IsShown)
     {
         HideMenuAction?.Invoke();
     }
     else
     {
         ShowMenuAction?.Invoke();
     }
 }
 private void OnSideMenuRequested(object sender, EventArgs e)
 {
     //System.Diagnostics.Debug.WriteLine("OnSideMenuRequested");
     if (SlideMenu.IsShown)
     {
         HideMenuAction?.Invoke();
     }
     else
     {
         ShowMenuAction?.Invoke();
     }
 }
Example #5
0
 private void Filter()
 {
     try
     {
         if (SlideMenu.IsShown)
         {
             HideMenuAction?.Invoke();
         }
         else if (!SlideMenu.IsShown)
         {
             ShowMenuAction?.Invoke();
         }
     } catch (Exception ex) {
         System.Diagnostics.Debug.Print("Error ---> {0}", ex);
     }
 }
Example #6
0
        public BasePage()
        {
            this.ToolbarItems.Add(new ToolbarItem {
                Command = new Command(() => {
                    ShowMenuAction?.Invoke();
                }),
                Text     = "SlideMenu",
                Priority = 0
            });

            this.SlideMenu = new SlideDownMenuView();

            MessagingCenter.Subscribe <ToggleSlideMenuNavigation> (this, ToggleSlideMenuNavigation.Message, (o) => {
                HideMenuAction?.Invoke();
            });
        }
Example #7
0
 public MainPage()
 {
     InitializeComponent();
     this.ToolbarItems.Add(new ToolbarItem
     {
         Command = new Command(() =>
         {
             if (this.SlideMenu.IsShown)
             {
                 HideMenuAction?.Invoke();
             }
             else
             {
                 ShowMenuAction?.Invoke();
             }
         }),
         Icon     = "icon.png",
         Text     = "Settings",
         Priority = 0
     });
     this.SlideMenu = new SettingsPage();
 }
Example #8
0
        public HomePage()
        {
            InitializeComponent();
            this.SlideMenu = new HomePageSlideMenu();

            menuButton.Clicked += MenuButton_Clicked;
            this.ToolbarItems.Add(new ToolbarItem
            {
                Command = new Command(() => {
                    if (this.SlideMenu.IsShown)
                    {
                        HideMenuAction?.Invoke();
                    }
                    else
                    {
                        ShowMenuAction?.Invoke();
                    }
                }),

                Text     = "Settings",
                Priority = 0
            });
        }
Example #9
0
 private void MenuButton_Clicked(object sender, System.EventArgs e)
 {
     ShowMenuAction?.Invoke();
 }
 private void OpenColors()
 {
     ShowMenuAction?.Invoke();
 }