private void HamburgerMenuControl_OnItemClick(object sender, ItemClickEventArgs e) { GridContenu.Children.Clear(); HamburgerMenuIconItem item = e.ClickedItem as HamburgerMenuIconItem; GridContenu.Children.Add(item.Tag as UIElement); }
private void HamburgerMenu_ItemClick(object sender, MahApps.Metro.Controls.ItemClickEventArgs e) { HamburgerMenuIconItem hmi = e.ClickedItem as HamburgerMenuIconItem; this.navFrame.Navigate(new Uri(hmi.Tag.ToString(), UriKind.Relative)); this.HamburgueMenuControl.IsPaneOpen = false; }
private void InitHamBurgerMenu() { HomePlaylist = new HamburgerMenuIconItem() { Label = "Manage Playlist", Icon = new PackIconMaterial() { Kind = PackIconMaterialKind.PlaylistPlay }, Tag = HomePlaylistService.GetHomePlaylistView() }; }
private void InitHamBurgerMenu() { VideoFolders = new HamburgerMenuIconItem() { Label = "Video folders", Icon = new PackIconMaterial() { Kind = PackIconMaterialKind.Folder }, Tag = new HomePageLocal() }; }
private void HamburgerMenuControl_OnItemClick(object sender, ItemClickEventArgs e) { HamburgerMenuIconItem ItemCliced = (HamburgerMenuIconItem)e.ClickedItem; if (ItemCliced.Label == "Prévision") { Prevision LaPageDePrévision = (Prevision)ItemCliced.Tag; if (((favoris)Favo.Tag).UserData.IsEmpty()) { MessageBox.Show("La liste des favoris est Vide"); } else { Tuple <int, int> LaWilayaEtLaDuree = ((favoris)Favo.Tag).UserData.getFirstElement(); if (LaPageDePrévision.NumWilaya != LaWilayaEtLaDuree.Item1) { DayData daymlm = IOData.LireDonnesJour("../../DonnesDunJour", LaWilayaEtLaDuree.Item1); DateTime today = DateTime.Now.Add(IOData.LireDate()); LaPageDePrévision.NumWilaya = LaWilayaEtLaDuree.Item1; LaPageDePrévision.Duree = LaWilayaEtLaDuree.Item2; if (daymlm != null && !daymlm.Vide() && (daymlm.DateDuJour.Date == today.Date)) { LaPageDePrévision.GridRec.Visibility = Visibility.Hidden; LaPageDePrévision.flipView1.Visibility = Visibility.Visible; LaPageDePrévision.BtmModifier.Visibility = Visibility.Visible; LaPageDePrévision.Sauv.Visibility = Visibility.Visible; LaPageDePrévision.Appliquer.Visibility = Visibility.Visible; LaPageDePrévision.BtnAnnuler.Visibility = Visibility.Visible; LaPageDePrévision.DounneesToday = daymlm; LaPageDePrévision.ConstruireLesPagesDePreduction(); } else { LaPageDePrévision.GridRec.Visibility = Visibility.Visible; LaPageDePrévision.flipView1.Visibility = Visibility.Hidden; LaPageDePrévision.BtnAnnuler.Visibility = Visibility.Hidden; LaPageDePrévision.Sauv.Visibility = Visibility.Hidden; LaPageDePrévision.Appliquer.Visibility = Visibility.Hidden; LaPageDePrévision.BtmModifier.Visibility = Visibility.Hidden; } } else if (LaPageDePrévision.Duree != LaWilayaEtLaDuree.Item2 && LaPageDePrévision.DounneesToday != null && !LaPageDePrévision.DounneesToday.Vide()) { LaPageDePrévision.Duree = LaWilayaEtLaDuree.Item2; LaPageDePrévision.ConstruireLesPagesDePreduction(); LaPageDePrévision.Sauv.Visibility = Visibility.Visible; } } } HamburgerMenuControl.Content = e.ClickedItem; }
public override DataTemplate SelectTemplate(object item, DependencyObject container) { FrameworkElement elemnt = container as FrameworkElement; HamburgerMenuIconItem user = item as HamburgerMenuIconItem; if (user is BedgeMenuItem) { return(elemnt.FindResource("BedgeMenuItemTemplate") as DataTemplate); } else { return(elemnt.FindResource("MenuItemTemplate") as DataTemplate); } }
public void HamburgerMenu_ItemClick(ItemClickEventArgs e) { HamburgerMenuIconItem item = e.ClickedItem as HamburgerMenuIconItem; if (item.Tag.ToString() == "Logout") { Logout(); } else if (item.Tag.ToString() == "Login") { ShowLogin(); } else { NavigateToView(item.Tag.ToString()); } }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { var viewModels = value as ICollection <IPane>; var collection = new HamburgerMenuItemCollection(); foreach (var vm in viewModels) { var item = new HamburgerMenuIconItem(); item.Label = vm.DisplayName; item.Icon = vm.Icon; item.Tag = vm; vm.Tag = item; collection.Add(item); } return(collection); }
private void InitHamBurgerMenu() { UsbDrive = new HamburgerMenuIconItem() { Label = "Removable Storage", Icon = new PackIconMaterial() { Kind = PackIconMaterialKind.Usb }, Tag = new UsbDrivePage() }; //MediaServer = new HamburgerMenuIconItem() //{ // Label = "Media server", // Icon = new PackIconMaterial() { Kind = PackIconMaterialKind.ServerNetwork }, // Tag = new MediaServerPage() //}; }
private void NavigationService_LoadCompleted(object sender, NavigationEventArgs e) { VideoFolder videoFolder = (VideoFolder)e.ExtraData; HamburgerMenuIcon = new HamburgerMenuIconItem() { Label = videoFolder.Name, Icon = new PackIconMaterial() { Kind = PackIconMaterialKind.FolderOpen } }; BackgroundService.Execute(() => { this.IsLoading = true; GetVideoFolder(videoFolder); }, String.Format("Updating files in {0}", videoFolder.Name), () => { this.IsLoading = false; OnDataLoaded(videoFolder); }); navigationService.LoadCompleted -= NavigationService_LoadCompleted; }
private void WindowCommandButton_OnWindowsCommandActivated(object sender, System.Windows.RoutedEventArgs e) { HamburgerMenuIconItem hamburgerMenuIconItem = (HamburgerMenuIconItem)(sender as Button).DataContext; navigatorService.NavigationService.Navigate(hamburgerMenuIconItem.Tag); }