Infragistics(R) NetAdvantage(R) : WPF 2012.1
Set xamContextMenu's Location
E-mail your feedback on this topic.
Shared XAML > Menus > xamContextMenu > Using xamContextMenu > Set xamContextMenu's Location

Glossary Item Box

The xamContextMenu™ control exposes several properties that emulate the placement of a ContextMenu control in Microsoft® WPF™. The xamContextMenu control's placement is determined by a combination of the following placement-related properties:

The following example code demonstrates how to set the placement of xamContextMenu. The code to attach xamContextMenu has been omitted to keep the example concise. For a code example on attaching xamContextMenu to a control, read Adding xamContextMenu to Your Page.

In XAML:

<ig:XamContextMenu Placement="AlignedBottom">
    <!--TODO: Add XamMenuItem objects here-->
</ig:XamContextMenu>

In Visual Basic:

Dim xamContextMenu1 As New XamContextMenu With {.Placement = PlacementMode.AlignedBottom}

'TODO: Add XamMenuItem objects to the context menu

In C#:

XamContextMenu xamContextMenu1 = new XamContextMenu
{
    Placement = PlacementMode.AlignedBottom
};

//TODO: Add XamMenuItem objects to the context menu
Related Topics

Opening and Showing xamContextMenu

Set xamContextMenu's Location

Binding to Data

Adding and Removing Items

Adding Separators between XamMenuItems

Adding Icons to XamMenuItems

Adding Check Boxes to XamMenuItems