Infragistics(R) NetAdvantage(R) : WPF 2012.1
Adding Separators between XamMenuItems
E-mail your feedback on this topic.
Shared XAML > Menus > xamMenu > Using xamMenu > Adding Separators between XamMenuItems

Glossary Item Box

Separator lines help to distinguish the different options in your xamMenu or xamContextMenu control. Adding a separator requires creating a xamMenuSeparator object and adding it to the items collection.

The following code shows you how to add separators between items in xamMenu.

In XAML:

<ig:XamMenu x:Name="xamMenu1" Height="25">
   <ig:XamMenuItem Header="File">
       <ig:XamMenuItem Header="New" />
       <ig:XamMenuItem Header="Open" />
       <!-- Separator line-->
       <ig:XamMenuSeparator />
       <ig:XamMenuItem Header="Exit" />
   </ig:XamMenuItem>
</ig:XamMenu>

In Visual Basic:

' Add separator
Dim separator1 As New XamMenuSeparator()
parentMenuItem.Items.Add(separator1)

In C#:

// Add separator
XamMenuSeparator separator1 = new XamMenuSeparator();
parentMenuItem.Items.Add(separator1);

Related Topics

Binding to Data

Layout Settings

Navigating Pages Using xamMenu

Adding and Removing Items

Adding Icons to XamMenuItems

Adding Check Boxes to XamMenuItems