| |
Menu and MenuItem |
|
|
<Window x:Class="SimpleStyles.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="SimpleStyles"
Background="#F8F8F8">
<ScrollViewer>
<WrapPanel>
<HeaderedItemsControl Header="Menu / ContextMenu">
<Menu Margin="8" Width="400">
<MenuItem Header="Top One">
<MenuItem Header="Sub One" InputGestureText="Ctrl+L" />
<MenuItem Header="Sub Two (With an Icon)" InputGestureText="Ctrl+A">
<MenuItem.Icon>
<Ellipse Width="16" Height="16" Fill="LightBlue" />
</MenuItem.Icon>
</MenuItem>
<MenuItem Header="Sub Three" />
<Separator />
<MenuItem Header="Sub Four">
<MenuItem Header="Sub One" />
<MenuItem Header="Sub Two" />
<MenuItem Header="Sub Three" />
</MenuItem>
<MenuItem Header="Sub Five" />
</MenuItem>
<MenuItem Header="Top Two">
<MenuItem Header="Sub One" />
<MenuItem Header="Sub Tow (Checkable)" IsCheckable="True" />
<MenuItem Header="Sub Three" />
<Separator />
<MenuItem Header="Sub Four">
<MenuItem Header="Sub One" />
<MenuItem Header="Sub Two" />
<MenuItem Header="Sub Three" />
</MenuItem>
<MenuItem Header="Sub Five" />
</MenuItem>
<MenuItem Header="Top Three" >
<MenuItem Header="Sub One" />
<MenuItem Header="Sub Two" />
<MenuItem Header="Sub Three" />
<Separator />
<MenuItem Header="Sub Five" />
</MenuItem>
</Menu>
</HeaderedItemsControl>
</WrapPanel>
</ScrollViewer>
</Window>
|
|
|
Related examples in the same category |
|