MenuFlyout Class
A Windows-8 styled pop-up menu.
Namespace: DevExpress.Xpf.WindowsUI
Assembly: DevExpress.Xpf.Controls.v24.2.dll
NuGet Package: DevExpress.Wpf.Controls
Declaration
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.
Note
MenuFlyout objects allow you to implement only one-level menus. Currently there is no built-in functionality to create sub-flyouts.
Related GitHub Examples
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.