VisualElement.MeasureOverride(Double, Double) 方法

定义

提供一种允许子类重写 Measure(Double, Double, MeasureFlags) 的方法,即使必须显式实现 接口,以避免与旧的 Measure 方法冲突。

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

请求的高度约束。

返回

元素想要在设备上显示的请求大小。

适用于