In This Article

BarSplitMenuItem Class

Represents a split menu item control, for use within a menu.

[TemplatePart("PART_PopupToggle", typeof(IInputElement))]
[PseudoClasses(new string[] { ":pressed" })]
public class BarSplitMenuItem : BarMenuItem, IDataContextProvider, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, IStyleable, INamed, IDataTemplateHost, ISetterValue, IChildIndexProvider, IInputElement, ISelectable, ICommandSource, ILogical
Inheritance:
object AvaloniaObject Animatable StyledElement Visual Layoutable Interactive InputElement Control TemplatedControl ItemsControl SelectingItemsControl HeaderedSelectingItemsControl MenuItem BarMenuItem object
Implements:
IDataContextProvider IThemeVariantHost IResourceHost IResourceNode IStyleHost ISetLogicalParent ISetInheritanceParent IStyleable INamed IDataTemplateHost ISetterValue IChildIndexProvider IInputElement ISelectable ICommandSource ILogical

Constructors

BarSplitMenuItem()

Initializes an instance of the class.

public BarSplitMenuItem()

Properties

CanExplicitlyToggleOnClick

Whether to explicitly toggle the Avalonia.Controls.MenuItem.IsChecked property when the menu item is clicked.

protected override bool CanExplicitlyToggleOnClick { get; }

Property Value

bool

Methods

OnApplyTemplate(TemplateAppliedEventArgs)

Called when the control's template is applied. In simple terms, this means the method is called just before the control is displayed.

protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
Parameter Type Description
e TemplateAppliedEventArgs

The event args.

OnCreateAutomationPeer()

Returns a new, type-specific Avalonia.Automation.Peers.AutomationPeer implementation for the control.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer:

The type-specific Avalonia.Automation.Peers.AutomationPeer implementation.

OnKeyDown(KeyEventArgs)

Handles directional navigation within the Avalonia.Controls.ItemsControl.

protected override void OnKeyDown(KeyEventArgs e)
Parameter Type Description
e KeyEventArgs

The key events.

OnPointerPressed(PointerPressedEventArgs)

Called before the Avalonia.Input.InputElement.PointerPressed event occurs.

protected override void OnPointerPressed(PointerPressedEventArgs e)
Parameter Type Description
e PointerPressedEventArgs

The event args.

OnPointerReleased(PointerReleasedEventArgs)

Called before the Avalonia.Input.InputElement.PointerReleased event occurs.

protected override void OnPointerReleased(PointerReleasedEventArgs e)
Parameter Type Description
e PointerReleasedEventArgs

The event args.

UpdateEnabledProperties()

Updates the CanEffectivelyExecute and CanEffectivelyOpenPopup properties.

protected override void UpdateEnabledProperties()

Inherited Members

Extension Methods