Skip to main content
Bar

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

BarManager.GetDXContextMenuPlacement(UIElement) Method

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

Namespace: DevExpress.Xpf.Bars

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

NuGet Package: DevExpress.Wpf.Core

#Declaration

public static PlacementMode GetDXContextMenuPlacement(
    UIElement element
)

#Parameters

Name Type Description
element UIElement

An UIElement object whose BarManager.DXContextMenuPlacement attached property value is to be obtained.

#Returns

Type Description
PlacementMode

A PlacementMode enumerator value that is the current 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 the 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 BarManager.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 GetDXContextMenuPlacement method.

See Also