private void gvMenu_ItemClick(object sender, ItemClickEventArgs e) { DatosMenu menu = ((DatosMenu)e.ClickedItem); switch (menu.Titulo) { case "Empleados": rootFrame.Navigate(typeof(abcEmpleado)); break; case "Areas": rootFrame.Navigate(typeof(abcAreas)); break; case "Reportes": break; case "Horarios": rootFrame.Navigate(typeof(MasterHorarios)); break; case "Usuarios": break; } }
private void paintMenuCustomColor(DatosMenu menu, GridViewItem itemContainer) { SolidColorBrush colorBackground = new SolidColorBrush(); Color color = new Color(); string hexCode = menu.BackGroundColor; color.A = 255; color.R = byte.Parse(hexCode.Substring(1, 2), NumberStyles.AllowHexSpecifier); color.G = byte.Parse(hexCode.Substring(3, 2), NumberStyles.AllowHexSpecifier); color.B = byte.Parse(hexCode.Substring(5, 2), NumberStyles.AllowHexSpecifier); colorBackground.Color = color; itemContainer.Background = colorBackground; }
public InicioModels() { icono = "ic"; id = 0; nombre = "Jeffer"; this.DatosMenu = new List <DatosMenu>(); DatosMenu.Add(new DatosMenu(1) { id = 1, nombre = "Placas", icono = "", }); }
protected override DataTemplate SelectTemplateCore(object item, DependencyObject container) { DataTemplate template = null; DatosMenu menu = (DatosMenu)item; Frame rootFrame = (Window.Current.Content as Frame); if (rootFrame.ActualWidth <= 320) { if (menu.TileSize == 1) { template = MenuMobileTemplate; } else { template = MenuMobileTemplateLarge; } } if (rootFrame.ActualWidth >= 320 && rootFrame.ActualWidth < 720) { if (menu.TileSize == 1) { template = MenuMobileTemplate; } else { template = MenuMobileTemplateLarge; } } if (rootFrame.ActualWidth >= 720) { if (menu.TileSize == 1) { template = MenuTabletTemplate; } else { template = MenuTabletTemplateLarge; } } paintMenuCustomColor(menu, (GridViewItem)container); return(template); }
private void gvMenu_ItemClick(object sender, ItemClickEventArgs e) { DatosMenu menu = ((DatosMenu)e.ClickedItem); switch (menu.Titulo) { case "Asignar/Reasignar": mainPivot.SelectedIndex = 1; cargarHorarios(); break; case "Crear/Modificar": mainPivot.SelectedIndex = 2; break; case "Permisos": // mainPivot.SelectedIndex = 3; break; } }