In This Article

BarMenuEventArgs Class

Provides event arguments for customizing a bar control's context or drop-down menu.

public class BarMenuEventArgs : CancelRoutedEventArgs
Inheritance:
object EventArgs RoutedEventArgs CancelRoutedEventArgs object

Constructors

BarMenuEventArgs(BarMenuKind)

Initializes a new instance of the class.

public BarMenuEventArgs(BarMenuKind kind)
Parameter Type Description
kind BarMenuKind

A BarMenuKind indicating the menu kind.

Properties

Items

The collection of items in the Menu.

public ItemCollection? Items { get; }

Property Value

ItemCollection

Remarks

This property resolves an items collection between a Avalonia.Controls.MenuFlyout and Avalonia.Controls.ItemsControl in the Menu property.

Kind

A BarMenuKind indicating the menu kind.

public BarMenuKind Kind { get; }

Property Value

BarMenuKind

Menu

The Avalonia.Controls.MenuFlyout or Avalonia.Controls.ItemsControl whose menu items are about to be displayed.

public AvaloniaObject? Menu { get; set; }

Property Value

AvaloniaObject

Owner

The object that owns the menu (e.g., the object whose context menu is being displayed).

public object? Owner { get; set; }

Property Value

object

Inherited Members

Extension Methods