Skip to main content

DevExpress v24.1 Update — Your Feedback Matters

Our What's New in v24.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

MenuFlyout Class

A Windows-8 styled pop-up menu.

Namespace: DevExpress.Xpf.WindowsUI

Assembly: DevExpress.Xpf.Controls.v24.1.dll

NuGet Package: DevExpress.Wpf.Controls

#Declaration

public class MenuFlyout :
    FlyoutBase,
    ILogicalOwner,
    IInputElement

#Remarks

The MenuFlyout is an evolution of traditional pop-up menus in Windows 8. It can only contain MenuFlyoutItem objects that represent regular menu items and MenuFlyoutSeparators that help to separate neighboring menu items. In fact, the MenuFlyout is a modified Flyout object designed to implement menus so you do not need to place your menu items into any sort of stack panel and manually arrange them into a column. The mark-up below illustrates how to create a simple flyout menu, assigned to the AppBarButton.

<dxwui:AppBarButton Label="Rotate" HorizontalAlignment="Right" Glyph="{dx:DXImage Image=DrillDown_32x32.png}" >
    <dxwui:AppBarButton.Flyout>
        <dxwui:MenuFlyout ShowIndicator="True">
            <dxwui:MenuFlyoutItem Content="90° clockwise" Command="{Binding RotateClockwise}" />
            <dxwui:MenuFlyoutItem Content="90° counter clockwise" Command="{Binding RotateCounterclockwise}" />
            <dxwui:MenuFlyoutItem Content="180°" Command="{Binding Rotate180}" />
            <dxwui:MenuFlyoutSeparator />
            <dxwui:MenuFlyoutItem Content="Reset" Command="{Binding RotateReset}" />
        </dxwui:MenuFlyout>
    </dxwui:AppBarButton.Flyout>
</dxwui:AppBarButton>

The figure below shows the result.

Flyout - Menu Flyout (Rotate)

Note

MenuFlyout objects allow you to implement only one-level menus. Currently there is no built-in functionality to create sub-flyouts.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the MenuFlyout class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

#Inheritance

Object
DispatcherObject
DependencyObject
Visual
UIElement
FrameworkElement
Control
DevExpress.Xpf.WindowsUI.Internal.Flyout.FlyoutBase
MenuFlyout
See Also