public MenuOption(string label, RelayCommand command, string viewModelName, MenuOptionAttr option, bool isEnabled, string menuGroup = null) { Label = label; Command = command; CommandParameter = label.Trim(); ViewModelName = viewModelName; MenuGroup = menuGroup; IsEnabled = isEnabled; Option = option; }
public LeftMenuViewModel(MenuOptionAttr menu) { try { switch (menu) { case MenuOptionAttr.STANDARD: MenuOptions = StandardMenu(); CurrentView = new MainTabControlViewModel(); break; default: break; } if (MenuOptions != null && MenuOptions.Count == 1) { MenuOptions[0].Command.Execute(MenuOptions[0].CommandParameter); } } catch (System.Exception ex) { System.Windows.MessageBox.Show(ex.ToString()); } }