In This Article

BarSplitButton Class

Represents a split button control, for use within a ribbon or toolbar.

public class BarSplitButton : BarPopupButton, IDataContextProvider, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, IStyleable, INamed, IDataTemplateHost, ISetterValue, IChildIndexProvider, IFocusScope, IInputElement, ILogical, ICommandSource
Inheritance:
object AvaloniaObject Animatable StyledElement Visual Layoutable Interactive InputElement Control TemplatedControl ItemsControl SelectingItemsControl MenuBase BarPopupButtonBase BarPopupButton object
Derived:
BarSplitToggleButton
Implements:
IDataContextProvider IThemeVariantHost IResourceHost IResourceNode IStyleHost ISetLogicalParent ISetInheritanceParent IStyleable INamed IDataTemplateHost ISetterValue IChildIndexProvider IFocusScope IInputElement ILogical ICommandSource

Constructors

BarSplitButton()

Initializes an instance of the class.

public BarSplitButton()

Properties

PopupIndicatorMargin

The margin Avalonia.Thickness around the popup indicator.

public Thickness PopupIndicatorMargin { get; set; }

Property Value

Thickness

Methods

OnClick()

Invokes the Click event.

protected override void OnClick()

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.

UpdateEnabledProperties()

Updates the CanEffectivelyExecute and CanEffectivelyOpenPopup properties.

protected override void UpdateEnabledProperties()

Events

Click

Raised when the button is clicked.

public event EventHandler<RoutedEventArgs>? Click

Event Type

EventHandler<RoutedEventArgs>

Fields

ClickEvent

Defines the Click event.

public static readonly RoutedEvent<RoutedEventArgs> ClickEvent

PopupIndicatorMarginProperty

Defines the PopupIndicatorMargin property.

public static readonly StyledProperty<Thickness> PopupIndicatorMarginProperty

Inherited Members

Extension Methods