Class MenuItemViewModel
- Namespace
- Acuit.Pinpoint.Workstation.Windows
- Assembly
- Acuit.Pinpoint.Workstation.Abstractions.dll
View model for a menu item.
public class MenuItemViewModel : ObservableObject, INotifyPropertyChanged, INotifyPropertyChanging
- Inheritance
-
MenuItemViewModel
- Implements
- Inherited Members
Constructors
MenuItemViewModel()
public MenuItemViewModel()
Properties
Command
[ObservableProperty]
public ICommand? Command { get; set; }
Property Value
Header
[ObservableProperty]
public string Header { get; set; }
Property Value
IsChecked
[ObservableProperty]
public bool IsChecked { get; set; }
Property Value
IsSeparator
[ObservableProperty]
public bool IsSeparator { get; set; }
Property Value
IsSubmenuOpen
[ObservableProperty]
public bool IsSubmenuOpen { get; set; }
Property Value
IsVisible
[ObservableProperty]
public bool IsVisible { get; set; }
Property Value
Items
Gets the collection of child items.
public ObservableCollection<MenuItemViewModel> Items { get; }
Property Value
SortHint
[ObservableProperty]
public string? SortHint { get; set; }
Property Value
Methods
AddChildItem(MenuItemViewModel)
Adds the specified menu item, honoring its sort hint.
public void AddChildItem(MenuItemViewModel item)
Parameters
itemMenuItemViewModelThe item to add.
Exceptions
- ArgumentNullException
itemis null.
AddChildItems(IEnumerable<MenuItemViewModel>)
Adds the specified menu items, honoring their sort hints as they are added.
public void AddChildItems(IEnumerable<MenuItemViewModel> items)
Parameters
itemsIEnumerable<MenuItemViewModel>The items to add.
Exceptions
- ArgumentNullException
itemsis null.
Events
SubmenuOpened
Occurs when this menu's submenu opened.
public event EventHandler? SubmenuOpened