MenuFlyout Class

A Windows-8 styled pop-up menu.

Namespace: DevExpress.Xpf.WindowsUI

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

Declaration

public class MenuFlyout :
    FlyoutBase,
    ILogicalOwner,
    IInputElement
Public Class MenuFlyout
    Inherits FlyoutBase
    Implements 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.

Inheritance

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