HwndHost.MeasureOverride(Size) HwndHost.MeasureOverride(Size) HwndHost.MeasureOverride(Size) HwndHost.MeasureOverride(Size) Method

定義

應配置引擎作業要求,傳回由 HwndHost 物件表示之視窗的大小。Returns the size of the window represented by the HwndHost object, as requested by layout engine operations.

protected:
 override System::Windows::Size MeasureOverride(System::Windows::Size constraint);
[System.Security.SecurityCritical]
[System.Security.SecurityTreatAsSafe]
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

HwndHost 物件的大小。The size of the HwndHost object.

傳回

HwndHost 物件的大小。The size of the HwndHost object.

備註

重要

此類型或成員無法在網際網路安全性區域中使用。This type or member is not available in the Internet security zone.

給繼承者的注意事項

Win32Win32中,視窗應該是在建立視窗時,配置所要求的大小。In Win32Win32, a window is expected to be the size requested by layout at the time the window is created. 只有當衍生類別具有有關必要視窗大小的其他資訊時,才應該覆寫此方法。Derived classes should override this method only if they have additional information regarding required window size.

此處的特定執行已經是FrameworkElement虛擬成員的覆寫,其基底大小限制在視窗控制碼上,並將一個或多個維度中的零值視為非條件約束。The specific implementation here is already an override of the FrameworkElement virtual member, which bases size constraints on the window handle and treats a zero value in one or more dimensions as a non-constraint. 類別也會MeasureOverride(Size)覆寫將導致表單剪輯太大的執行。 WindowsFormsHostThe WindowsFormsHost class also overrides a MeasureOverride(Size) implementation that will result in a clip of the form if it is too large.

安全性

SecurityPermission
若要調整配置(藉由讓版面配置引擎在裝載的區域上運作)。in order to adjust the layout (by having the layout engine act upon the hosted region). 相關聯的列舉:UnmanagedCodeAssociated enumeration: UnmanagedCode

適用於