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

请求的高度约束。

返回

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

适用于