Logo
My Account |  Site Map | Contact Us  
 The same content in Microsoft HTML help file format is included in the download package.
Orientation

EO.Wpf Menu allows you to switch Menu orientation by simply setting its Orientation property. The following code set its Orientation to Vertical:

XAML
<Window x:Class="Test.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:eo="http://schemas.essentialobjects.com/wpf/"
        Title="MainWindow" Height="250" Width="350">
    <DockPanel LastChildFill="False">
        <eo:Menu IsMainMenu="True" DockPanel.Dock="Left" Orientation="Vertical">
            <eo:MenuItem Header="_File">
                <eo:MenuItem Header="Open"></eo:MenuItem>
                <eo:MenuItem Header="Close"></eo:MenuItem>
            </eo:MenuItem>
            <eo:MenuItem Header="_Edit" />
            <eo:MenuItem Header="_View" />
            <eo:MenuItem Header="_Window" />
            <eo:MenuItem Header="_Help" />
        </eo:Menu>
    </DockPanel>
</Window>

The above code produces the following result:

Note that a vertical menu does not have a background by default. So you must manually set the


Direct link to this topic