Represents a method that provides custom positioning for a Popup control.
Assembly: PresentationFramework (in PresentationFramework.dll)
public delegate array<CustomPopupPlacement>^ CustomPopupPlacementCallback( Size popupSize, Size targetSize, Point offset )
Return ValueType: array<System.Windows.Controls.Primitives::CustomPopupPlacement>
An array of possible CustomPopupPlacement positions for the Popup control relative to the PlacementTarget.
When the Placement property is set to Custom, the Popup calls a defined instance of the 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 delegate in order to position the Popup. The callback delegate returns two CustomPopupPlacement 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.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.