public UserControlMenuItem(MenuItem menuItem) { InitializeComponent(); Menu = menuItem; TempMenu = new MenuItem(Menu.Header, null, Menu.Icon); expanderMenu.Visibility = Visibility.Collapsed; listBoxMenuItem.Visibility = Visibility.Collapsed; DataContext = menuItem; }
public SideMenu() { InitializeComponent(); DataContext = EntityFactory.User = user.SelectById(2); btnInfo.Content = EntityFactory.User; tbUsername.Text = EntityFactory.User.username; var menuDashboard = new MenuItem("Dnevne napomene", PackIconKind.ViewDashboard, this); var menuClientItems = new List <SubItem>() { new SubItem("Pregled klijenata"), new SubItem("Kreiranje klijenta"), new SubItem("Izmjena klijenta") }; var menuClient = new MenuItem("Rad sa klijentima", menuClientItems, PackIconKind.People); var menuHallItems = new List <SubItem>() { new SubItem("Pregled sala"), new SubItem("Kreiranje sale"), new SubItem("Izmjena sale") }; var menuHall = new MenuItem("Rad sa salama", menuHallItems, PackIconKind.DoorOpen); var menuReservationItems = new List <SubItem>() { new SubItem("Pregled rezervacija"), new SubItem("Kreiranje rezervacije"), new SubItem("Izmjena rezervacije") }; var menuReservation = new MenuItem("Rad sa rezervacijama", menuReservationItems, PackIconKind.Events); var menuRecieptItems = new List <SubItem>() { new SubItem("Pregled računa"), new SubItem("Kreiranje računa"), }; var menuReciept = new MenuItem("Rad sa računima", menuRecieptItems, PackIconKind.Receipt); var menuSchedule = new MenuItem("Mjesečni pregled", PackIconKind.Calendar, this); stackMenu.Children.Add(new UserControlMenuItem(menuDashboard)); stackMenu.Children.Add(new UserControlMenuItem(menuClient)); stackMenu.Children.Add(new UserControlMenuItem(menuHall)); stackMenu.Children.Add(new UserControlMenuItem(menuReservation)); stackMenu.Children.Add(new UserControlMenuItem(menuReciept)); stackMenu.Children.Add(new UserControlMenuItem(menuSchedule)); Menu = this; }