Popup.PlacementTarget Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the element relative to which the Popup is positioned when it opens.

Namespace:   System.Windows.Controls.Primitives
Assembly:  PresentationFramework (in PresentationFramework.dll)

member PlacementTarget : UIElement with get, set

Property Value

Type: System.Windows.UIElement

The UIElement that is the logical parent of the Popup control. The default is null.

You can position a popup by setting the PlacementTarget, PlacementRectangle, Placement, HorizontalOffset, and VerticalOffsetProperty properties. For more information, see Popup Placement Behavior.

Identifier field


Metadata properties set to true


The following example creates a Popup that is the child of a Canvas, and sets PlacementTarget to ellipse1, so the popup is relative to the Ellipse.

.NET Framework
Available since 3.0
Return to top