New to Telerik UI for WPFStart a free 30-day trial

Placement

Updated on Sep 24, 2025

The RadContextMenu exposes a set of properties, which allow you to specify the location, on which it will appear.

Placement

The placement property allows you to specify the position of the RadContextMenu relatively to the target element or the value of the PlacementRect. It has the following values.

  • Absolute - positions the RadContextMenu absolutely.

  • Bottom - displays the RadContextMenu below the target control or the rect.

  • Center - displays the RadContextMenu in the center of the target control or the rect.

  • Left - displays the RadContextMenu on the left of the target control or the rect.

  • Right - displays the RadContextMenu on the right of the target control or the rect.

  • Top - displays the RadContextMenu above the target control or the rect.

Here is an example:

XAML
	<TextBox x:Name="InputBox"
	         Width="200"
	         VerticalAlignment="Top">
	    <telerik:RadContextMenu.ContextMenu>
	        <telerik:RadContextMenu x:Name="radContextMenu"
	                                Placement="Bottom">
	            ...
	        </telerik:RadContextMenu>
	    </telerik:RadContextMenu.ContextMenu>
	</TextBox>

WPF RadContextMenu with Placement Bottom

PlacementRectangle

The PlacementRectangle is of type Rect and specifies the position of the RadContextMenu. It can be combined with the Placement property.

roperties of type Rect cannot be declared in-line because this is not supported. Set the property as attribute by passing the x, y, width and height parameters. The type converter will handle them from there.

XAML
	<TextBox x:Name="InputBox1"
	 Width="200"
	 VerticalAlignment="Top">
	    <telerik:RadContextMenu.ContextMenu>
	        <telerik:RadContextMenu x:Name="radContextMenu1"
	                                Placement="Bottom"
	                                PlacementRectangle="0,0,100,100">
	            ...
	        </telerik:RadContextMenu>
	    </telerik:RadContextMenu.ContextMenu>
	</TextBox>

WPF RadContextMenu with Placement Rectangle

PlacementTarget

The PlacementTarget property is used when the RadContextMenu should be displayed on a position related to a different UI element (not the one attached to).

If you are using the same RadContextMenu for multiple elements and you want to open it from the code behind, it is mandatory to set the PlacementTarget.

C#
	public Default_Cs()
	{
	    InitializeComponent();
	    this.radContextMenu.PlacementTarget = this.InputBox;
	    this.radContextMenu.IsOpen = true;
	}

WPF RadContextMenu with Placement Target

PlacementPlacement TargetTarget AreaContext Menu Target PointContext Menu Alignment Point
AbsoluteNot applicable. PlacementTarget is ignored.The screen, or PlacementRectangle if it is set. The PlacementRectangle is relative to the screen.The top-left corner of the target area.The top-left corner of the RadContextMenu.
AbsolutePointNot applicable. PlacementTarget is ignored.The screen, or PlacementRectangle if it is set. The PlacementRectangle is relative to the screen.The top-left corner of the target area.The top-left corner of the RadContextMenu.
BottomPlacementTarget or parent.The target object, or PlacementRectangle if it is set. The PlacementRectangle is relative to the target object.The bottom-left corner of the target area.The top-left corner of the RadContextMenu.
CenterPlacementTarget or parent.The target object, or PlacementRectangle if it is set. The PlacementRectangle is relative to the target object.The center of the target area.The center of the RadContextMenu.
LeftPlacementTarget or parent.The target object, or PlacementRectangle if it is set. The PlacementRectangle is relative to the target object.The top-left corner of the target area.The top-right corner of the RadContextMenu.
MouseNot applicable. PlacementTarget is ignored.The bounds of the mouse pointer. PlacementRectangle is ignored.The bottom-left corner of the target area.The top-left corner of the RadContextMenu.
MousePointNot applicable. PlacementTarget is ignored.The bounds of the mouse pointer. PlacementRectangle is ignored.The top-left corner of the target area.The top-left corner of the RadContextMenu.
RelativePlacementTarget or parent.The target object, or PlacementRectangle if it is set. The PlacementRectangle is relative to the target object.The top-left corner of the target area.The top-left corner of the RadContextMenu.
RelativePointPlacementTarget or parent.The target object, or PlacementRectangle if it is set. The PlacementRectangle is relative to the target object.The top-left corner of the target area.The top-left corner of the RadContextMenu.
RightPlacementTarget or parent.The target object, or PlacementRectangle if it is set. The PlacementRectangle is relative to the target object.The top-right corner of the target area.The top-left corner of the RadContextMenu.
TopPlacementTarget or parent.The target object, or PlacementRectangle if it is set. The PlacementRectangle is relative to the target object.The top-left corner of the target area.The bottom-left corner of the RadContextMenu.

If there are any sub-menus in the RadContextMenu their dropdown position can be specified through the DropDownPlacement property of the RadMenuItem. It has the following values:

  • Auto - positions the dropdown of the sub-menu automatically.

  • Bottom - displays the nested RadMenuItems below the parent RadMenuItem.

  • Left - displays the nested RadMenuItems on the left of the parent RadMenuItem.

  • Right - displays the nested RadMenuItems on the right of the parent RadMenuItem.

  • Top - displays the nested RadMenuItems above the parent RadMenuItem.

Here is an example:

XAML
	<TextBox x:Name="InputBox2"
	         Width="200"
	         VerticalAlignment="Top">
	    <telerik:RadContextMenu.ContextMenu>
	        <telerik:RadContextMenu x:Name="radContextMenu2">
	            ...
	            <telerik:RadMenuItem Header="Sub Menu" DropDownPlacement="Right">
	                <telerik:RadMenuItem Header="Item 1" />
	                <telerik:RadMenuItem Header="Item 2" />
	            </telerik:RadMenuItem>
	            ...
	        </telerik:RadContextMenu>
	    </telerik:RadContextMenu.ContextMenu>
	</TextBox>

WPF RadContextMenu with Menu Item DropDownPlacement

See Also