共用方式為


VisualElement.MeasureOverride(Double, Double) 方法

定義

允許子類別在控件量值傳遞期間實作自定義量值邏輯。

protected:
 virtual Microsoft::Maui::Graphics::Size MeasureOverride(double widthConstraint, double heightConstraint);
protected virtual Microsoft.Maui.Graphics.Size MeasureOverride (double widthConstraint, double heightConstraint);
abstract member MeasureOverride : double * double -> Microsoft.Maui.Graphics.Size
override this.MeasureOverride : double * double -> Microsoft.Maui.Graphics.Size
Protected Overridable Function MeasureOverride (widthConstraint As Double, heightConstraint As Double) As Size

參數

widthConstraint
Double

所要求的寬度條件約束。

heightConstraint
Double

所要求的高度條件約束。

傳回

元素想要在裝置上顯示的要求大小。

適用於