WindowsFormsHost.MeasureOverride(Size) WindowsFormsHost.MeasureOverride(Size) WindowsFormsHost.MeasureOverride(Size) WindowsFormsHost.MeasureOverride(Size) Method

定義

覆寫 MeasureOverride(Size) 的基底類別實作,測量 WindowsFormsHost 物件的大小,然後傳回正確的大小給配置引擎。Overrides the base class implementation of MeasureOverride(Size) to measure the size of a WindowsFormsHost object and return proper sizes to the layout engine.

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

參數

constraint
Size Size Size Size

WindowsFormsHost 物件的可用大小。The available size for the WindowsFormsHost object.

傳回

WindowsFormsHost 物件所需的大小。The desired size of the WindowsFormsHost object.

備註

在 WPF 版面配置的大小條件約束是硬式條件約束。Size constraints in WPF layout are hard constraints. 如果超過限制,主機必須裁剪內容內裝載的區域。If the constraints are exceeded, the host must clip the content within the hosted region. 此方法的實作會強制執行此行為。The implementation of this method enforces this behavior.

適用於

另請參閱