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(); } }
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(); } }
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); } }
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(); }); }
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(); }
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 }); }
private void MenuButton_Clicked(object sender, System.EventArgs e) { ShowMenuAction?.Invoke(); }
private void OpenColors() { ShowMenuAction?.Invoke(); }