FrameworkElement.MeasureCore(Size) FrameworkElement.MeasureCore(Size) FrameworkElement.MeasureCore(Size) FrameworkElement.MeasureCore(Size) Method

定义

实现 FrameworkElement 的基本度量传递布局系统行为。Implements basic measure-pass layout system behavior for FrameworkElement.

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

参数

availableSize
Size Size Size Size

父元素可以赋予子元素的可用大小。The available size that the parent element can give to the child elements.

返回

此元素在布局中的所需大小。The desired size of this element in layout.

注解

此方法重UIElement.MeasureCore写以连接 wpf 核心级和 wpf 框架级别的布局度量实现。This method overrides UIElement.MeasureCore to connect the WPF core-level and WPF framework-level layout measure implementations. FrameworkElement实现会密封方法。The FrameworkElement implementation seals the method. 若要调整在 WPF 框架级别上生成的任何元素的度量值传递布局行为, 请MeasureOverride改为重写。To adjust the measure pass layout behavior of any element that builds on the WPF framework-level, override MeasureOverride instead. 若要调整特意不在 WPF 框架级别或使用FrameworkElement上生成的元素的度量值传递布局行为, 请重写。 UIElement.MeasureCoreTo adjust the measure pass layout behavior of an element that deliberately does not build on the WPF framework-level or use FrameworkElement, override UIElement.MeasureCore.

适用于