Popup.MeasureOverride(Size) 方法

定义

确定逻辑父级的可视化树中 Popup 内容所需的大小。Determines the required size of the Popup content within the visual tree of the logical parent.

protected:
 override System::Windows::Size MeasureOverride(System::Windows::Size availableSize);
protected override System.Windows.Size MeasureOverride (System.Windows.Size availableSize);
override this.MeasureOverride : System.Windows.Size -> System.Windows.Size
Protected Overrides Function MeasureOverride (availableSize As Size) As Size

参数

availableSize
Size

此元素可提供给子级的可用大小。The available size that this element can give to the child. 您可以把无穷当作一个值,用来指示可将该元素的大小调整为符合任何可用内容。You can use infinity as a value to indicate that the element can size to whatever content is available.

返回

SizeHeight 属性都等于零 (0) 的 Width 结构。A Size structure that has the Height and Width properties both equal to zero (0).

注解

此方法始终返回Size宽度和高度均为零 (0) 的, 因为Popup内容不位于其逻辑父级或PlacementTarget的可视化树中。This method always returns a Size that has a width and height of zero (0), because Popup content is not located in the visual tree of its logical parent or PlacementTarget. 子内容是在具有其自己的可视化树的不同窗口中创建的。The child content is created in a different window that has its own visual tree.

适用于