Class Menu
A top-level menu control.
public class Menu : MenuBase, INotifyPropertyChanged, IDataContextProvider, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IDataTemplateHost, ISetterValue, IChildIndexProvider, IFocusScope, IInputElement, ILogical
- Inheritance
-
Menu
- Implements
- Inherited Members
- Extension Methods
Constructors
Menu()
Initializes a new instance of the Menu class.
public Menu()
Menu(IMenuInteractionHandler)
Initializes a new instance of the Menu class.
public Menu(IMenuInteractionHandler interactionHandler)
Parameters
interactionHandler
IMenuInteractionHandlerThe menu interaction handler.
Methods
Close()
Closes the menu.
public override void Close()
OnAttachedToVisualTree(VisualTreeAttachmentEventArgs)
Called when the control is added to a rooted visual tree.
protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
Parameters
e
VisualTreeAttachmentEventArgsThe event args.
Open()
Opens the menu.
public override void Open()
PrepareContainerForItemOverride(Control, object?, int)
Prepares the specified element to display the specified item.
protected override void PrepareContainerForItemOverride(Control element, object? item, int index)