Popup.CustomPopupPlacementCallback Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a delegate handler method that positions the Popup control.
public:
property System::Windows::Controls::Primitives::CustomPopupPlacementCallback ^ CustomPopupPlacementCallback { System::Windows::Controls::Primitives::CustomPopupPlacementCallback ^ get(); void set(System::Windows::Controls::Primitives::CustomPopupPlacementCallback ^ value); };
[System.ComponentModel.Bindable(false)]
public System.Windows.Controls.Primitives.CustomPopupPlacementCallback CustomPopupPlacementCallback { get; set; }
[<System.ComponentModel.Bindable(false)>]
member this.CustomPopupPlacementCallback : System.Windows.Controls.Primitives.CustomPopupPlacementCallback with get, set
Public Property CustomPopupPlacementCallback As CustomPopupPlacementCallback
Property Value
The CustomPopupPlacementCallback delegate method that provides placement information for the Popup control. The default is null
.
- Attributes
Examples
The following example shows how to set a CustomPopupPlacementCallback delegate.
popup1.CustomPopupPlacementCallback =
new CustomPopupPlacementCallback(placePopup);
popup1.CustomPopupPlacementCallback = New CustomPopupPlacementCallback(AddressOf placePopup)
public CustomPopupPlacement[] placePopup(Size popupSize,
Size targetSize,
Point offset)
{
CustomPopupPlacement placement1 =
new CustomPopupPlacement(new Point(-50, 100), PopupPrimaryAxis.Vertical);
CustomPopupPlacement placement2 =
new CustomPopupPlacement(new Point(10, 20), PopupPrimaryAxis.Horizontal);
CustomPopupPlacement[] ttplaces =
new CustomPopupPlacement[] { placement1, placement2 };
return ttplaces;
}
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
Remarks
Dependency Property Information
Identifier field | CustomPopupPlacementCallbackProperty |
Metadata properties set to true |
None |
Applies to
See also
Работете съвместно с нас в GitHub
Източникът за това съдържание може да бъде намерен в GitHub, където можете също да създавате и преглеждате проблеми и да изтегляте искания. За повече информация вижте нашето ръководство за сътрудник.
Обратна връзка
https://aka.ms/ContentUserFeedback.
Очаквайте скоро: През цялата 2024 г. постепенно ще отстраняваме проблемите в GitHub като механизъм за обратна връзка за съдържание и ще го заменим с нова система за обратна връзка. За повече информация вижте:Подаване и преглед на обратна връзка за