Defines custom placement parameters for a Popup control.
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
Thetype exposes the following members.
|Equals||Compares this structure with another structure to determine whether they are equal. (Overrides ValueType.Equals(Object).)|
|GetHashCode||Gets the hash code for this structure. (Overrides ValueType.GetHashCode().)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|ToString||Returns the fully qualified type name of this instance. (Inherited from ValueType.)|
A System.Windows.Controls.Primitives.CustomPopupPlacementCallback delegate returns an array of these structures as custom placement options for a Popup when the Placement property is set to Custom.
When the Placement property is set to Custom, the Popup calls a defined instance of the CustomPopupPlacementCallback delegate. This delegate returns a set of possible points that are relative to the top left corner of the target area and the top left corner of the Popup. The Popup placement occurs at the point that provides the best visibility.
The following example shows how to define the position of a Popup by setting the Placement property to Custom. It also shows how to create and assign a CustomPopupPlacementCallback delegate in order to position the Popup. The callback delegate returns two objects. If the Popup is hidden by a screen edge at the first position, the Popup is placed at the second position.
For the complete sample, see Popup Placement Sample.