Popup.CustomPopupPlacementCallback Property

 

Gets or sets a delegate handler method that positions the Popup control.

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

<BindableAttribute(False)>
Public Property CustomPopupPlacementCallback As CustomPopupPlacementCallback

Property Value

Type: System.Windows.Controls.Primitives.CustomPopupPlacementCallback

The CustomPopupPlacementCallback delegate method that provides placement information for the Popup control. The default is null.

Identifier field

CustomPopupPlacementCallbackProperty

Metadata properties set to true

None

The following example shows how to set a CustomPopupPlacementCallback delegate.

popup1.CustomPopupPlacementCallback = New CustomPopupPlacementCallback(AddressOf placePopup)
Public Function placePopup(ByVal popupSize As Size, ByVal targetSize As Size, ByVal offset As Point) As CustomPopupPlacement()
	Dim placement1 As New CustomPopupPlacement(New Point(-50, 100), PopupPrimaryAxis.Vertical)

	Dim placement2 As New CustomPopupPlacement(New Point(10, 20), PopupPrimaryAxis.Horizontal)

	Dim ttplaces() As CustomPopupPlacement = { placement1, placement2 }
	Return ttplaces
End Function

.NET Framework
Available since 3.0
Return to top
Show: