MenuFactoryCreateMenuItemOptions Class
The options to be used when creating a menu item using IMenuFactory.
public class MenuFactoryCreateMenuItemOptions
- Inheritance:
- object object
Constructors
MenuFactoryCreateMenuItemOptions()
Initializes an instance of the class.
public MenuFactoryCreateMenuItemOptions()
Properties
AllowAccessKey
Indicates if Text allows access key.
public bool AllowAccessKey { get; set; }
Property Value
- bool:
true
to allow access keys; otherwise,false
to escape the underscores characters that identify access keys. The default value istrue
.
Command
The ICommand to assign to the menu item.
CommandParameter
The command parameter.
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
null
value indicates the menu item cannot be checked.
Name
The name that uniquely identifies the menu item and may also be used for automation ID.
Owner
An owner for the menu item which can be used for additional context.
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()