CustomPopupPlacementCallback 委托

定义

表示为 Popup 控件提供自定义定位的一种方法。Represents a method that provides custom positioning for a Popup control.

public delegate cli::array <System::Windows::Controls::Primitives::CustomPopupPlacement> ^ CustomPopupPlacementCallback(Size popupSize, Size targetSize, Point offset);
public delegate System.Windows.Controls.Primitives.CustomPopupPlacement[] CustomPopupPlacementCallback(Size popupSize, Size targetSize, Point offset);
type CustomPopupPlacementCallback = delegate of Size * Size * Point -> CustomPopupPlacement[]
Public Delegate Function CustomPopupPlacementCallback(popupSize As Size, targetSize As Size, offset As Point) As CustomPopupPlacement() 

参数

popupSize
Size

Popup 控件的 SizeThe Size of the Popup control.

targetSize
Size

SizePlacementTargetThe Size of the PlacementTarget.

offset
Point

根据 HorizontalOffsetVerticalOffset 属性值计算得到的 PointThe Point computed from the HorizontalOffset and VerticalOffset property values.

返回值

CustomPopupPlacement[]

针对与 PlacementTarget 相关的 Popup 控件的可能 CustomPopupPlacement 位置数组。An array of possible CustomPopupPlacement positions for the Popup control relative to the PlacementTarget.

继承
CustomPopupPlacementCallback

注解

当显示弹出ToolTip窗口时, 将选择一个点来最大程度地显示可见窗口的数量。When the Popup is displayed, a point is chosen that maximizes the amount of the ToolTip window that is visible. 和类分别定义类型CustomPopupPlacementCallback的属性。 ToolTip ContextMenu PopupThe ContextMenu, Popup and ToolTip classes each define a property of type CustomPopupPlacementCallback.

扩展方法

GetMethodInfo(Delegate)

获取指示指定委托表示的方法的对象。Gets an object that represents the method represented by the specified delegate.

适用于

另请参阅