MenuFactoryMenuItemOptions Class
The options to be used when creating a menu item using IMenuFactory.
public class MenuFactoryMenuItemOptions
- Inheritance:
- object object
Constructors
MenuFactoryMenuItemOptions()
Initializes an instance of the class.
public MenuFactoryMenuItemOptions()
Properties
AllowAccessKey
Indicates if Text allows access key.
public bool AllowAccessKey { get; set; }
Property Value
- bool:
trueto allow access keys; otherwise,falseto escape the underscores characters that identify access keys. The default value istrue.
AllowPopup
Indicates that the menu item created should allow for the configuration of a popup of additional menu items.
public bool AllowPopup { get; set; }
Property Value
- bool:
This property is ignored for menu items that do not require a special
Typeto support popups. The default value isfalse.
Command
The ICommand to assign to the menu item.
CommandParameter
The command parameter.
Description
A description of the menu item which could be used for tooltips.
Icon
The object which defines the menu icon.
IconTemplate
The Avalonia.Controls.Templates.IDataTemplate that may be necessary to display the Icon.
public IDataTemplate? IconTemplate { get; set; }
Property Value
- IDataTemplate
InputGesture
The input gesture associated with the menu item.
public KeyGesture? InputGesture { get; set; }
Property Value
- KeyGesture
IsChecked
Whether the menu item is checked.
public bool? IsChecked { get; set; }
Property Value
- bool?:
Since menu items do not support tri-state, a
nullvalue indicates the menu item cannot be checked.
IsEnabled
Whether the menu item is enabled.
public bool? IsEnabled { get; set; }
Property Value
Key
The key that uniquely identifies the menu item.
Owner
An owner for the menu item which can be used for additional context.
Tag
An object that contains data about the menu item to be created.
Text
The text to be displayed.
ToggleType
The toggle type to be used for checkable menu items.
public MenuItemToggleType ToggleType { get; set; }
Property Value
- MenuItemToggleType:
This property is ignored when IsChecked is
null. The default value is Avalonia.Controls.MenuItemToggleType.CheckBox.
Inherited Members
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()