ContextMenuService.PlacementRectangle Attached Property
Gets or sets the area relative to which the context menu is positioned when it opens.
Assembly: PresentationFramework (in PresentationFramework.dll)
You can position a ContextMenu by setting the PlacementTarget, , Placement, HorizontalOffset, and VerticalOffsetProperty properties. These properties behave the same as they do for a Popup. For more information, see Popup Placement Behavior.
Legacy Code Example
The following example assigns the same ContextMenu to two buttons and sets the HasDropShadow, Placement, , HorizontalOffset, and VerticalOffset properties to set the ContextMenu to different positions for each button.Code snippet is not found. Confirm that the code snippet name 'ContextMenuService_snip' is correct.