Table of Contents

Class MenuFlyout

Namespace
Avalonia.Controls
Assembly
Avalonia.Controls.dll
public class MenuFlyout : PopupFlyoutBase, INotifyPropertyChanged, IPopupHostProvider
Inheritance
MenuFlyout
Implements
Inherited Members

Constructors

MenuFlyout()

public MenuFlyout()

Fields

FlyoutPresenterThemeProperty

Defines the FlyoutPresenterTheme property.

public static readonly StyledProperty<ControlTheme?> FlyoutPresenterThemeProperty

Field Value

StyledProperty<ControlTheme>

ItemContainerThemeProperty

Defines the ItemContainerTheme property.

public static readonly StyledProperty<ControlTheme?> ItemContainerThemeProperty

Field Value

StyledProperty<ControlTheme>

ItemTemplateProperty

Defines the ItemTemplate property

public static readonly StyledProperty<IDataTemplate?> ItemTemplateProperty

Field Value

StyledProperty<IDataTemplate>

ItemsSourceProperty

Defines the ItemsSource property

public static readonly StyledProperty<IEnumerable?> ItemsSourceProperty

Field Value

StyledProperty<IEnumerable>

Properties

FlyoutPresenterClasses

public Classes FlyoutPresenterClasses { get; }

Property Value

Classes

FlyoutPresenterTheme

Gets or sets the ControlTheme that is applied to the container element generated for the flyout presenter.

public ControlTheme? FlyoutPresenterTheme { get; set; }

Property Value

ControlTheme

ItemContainerTheme

Gets or sets the ControlTheme that is applied to the container element generated for each item.

public ControlTheme? ItemContainerTheme { get; set; }

Property Value

ControlTheme

ItemTemplate

Gets or sets the template used for the items

public IDataTemplate? ItemTemplate { get; set; }

Property Value

IDataTemplate

Items

[Content]
public ItemCollection Items { get; }

Property Value

ItemCollection

ItemsSource

Gets or sets the items of the MenuFlyout

public IEnumerable? ItemsSource { get; set; }

Property Value

IEnumerable

Methods

CreatePresenter()

Used to create the content the Flyout displays

protected override Control CreatePresenter()

Returns

Control

OnOpening(CancelEventArgs)

protected override void OnOpening(CancelEventArgs args)

Parameters

args CancelEventArgs

OnPropertyChanged(AvaloniaPropertyChangedEventArgs)

Called when a avalonia property changes on the object.

protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)

Parameters

change AvaloniaPropertyChangedEventArgs

The property change details.