Back to Devexpress

BarManager.SetDXContextMenuPlacement(UIElement, PlacementMode) Method

wpf-devexpress-dot-xpf-dot-bars-dot-barmanager-dot-setdxcontextmenuplacement-x28-system-dot-windows-dot-uielement-system-dot-windows-dot-controls-dot-primitives-dot-placementmode-x29.md

latest3.3 KB
Original Source

BarManager.SetDXContextMenuPlacement(UIElement, PlacementMode) Method

Sets the BarManager.DXContextMenuPlacement attached property value for a specific UI element.

Namespace : DevExpress.Xpf.Bars

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public static void SetDXContextMenuPlacement(
    UIElement element,
    PlacementMode value
)
vb
Public Shared Sub SetDXContextMenuPlacement(
    element As UIElement,
    value As PlacementMode
)

Parameters

NameTypeDescription
elementUIElement

A UIElement object whose BarManager.DXContextMenuPlacement attached property value is to be set.

| | value | PlacementMode |

A PlacementMode enumerator value that is the new BarManager.DXContextMenuPlacement attached property value for a specific UI element.

|

Remarks

Use the BarManager.DXContextMenu attached property to assign an IPopupControl object to a UI element as this element’s popup or context menu. When invoked by a mouse click (use the BarManager.SetMenuShowMouseButton method to specify exactly which mouse button displays a context menu), a popup is displayed relative to a cursor position. If invoked via a keyboard Menu (Application) key, the popup’s position is specified according to the element’s BarManager.DXContextMenuPlacement attached property value.

The SetDXContextMenuPlacement method sets the BarManager.DXContextMenuPlacement attached property value for a specific UI element. To get the current context menu’s position for an element, use the BarManager.GetDXContextMenuPlacement method.

See Also

GetDXContextMenuPlacement(UIElement)

DXContextMenu

GetMenuShowMouseButton(UIElement)

BarManager Class

BarManager Members

DevExpress.Xpf.Bars Namespace