FrameworkElement.MeasureCore(Size) 方法

定義

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

父項目可以提供給子項目使用的大小。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 架構層級為基礎之元素的量值傳遞配置行為,請改為覆寫 MeasureOverrideTo 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.

適用於