VisualElement.OnMeasure(Double, Double) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
注意
Use MeasureOverride instead
进行布局测量时调用的方法。
protected:
virtual Microsoft::Maui::SizeRequest OnMeasure(double widthConstraint, double heightConstraint);
protected virtual Microsoft.Maui.SizeRequest OnMeasure (double widthConstraint, double heightConstraint);
[System.Obsolete("Use MeasureOverride instead")]
protected virtual Microsoft.Maui.SizeRequest OnMeasure (double widthConstraint, double heightConstraint);
abstract member OnMeasure : double * double -> Microsoft.Maui.SizeRequest
override this.OnMeasure : double * double -> Microsoft.Maui.SizeRequest
[<System.Obsolete("Use MeasureOverride instead")>]
abstract member OnMeasure : double * double -> Microsoft.Maui.SizeRequest
override this.OnMeasure : double * double -> Microsoft.Maui.SizeRequest
Protected Overridable Function OnMeasure (widthConstraint As Double, heightConstraint As Double) As SizeRequest
参数
- widthConstraint
- Double
请求的宽度约束。
- heightConstraint
- Double
请求的高度约束。
返回
要显示在设备上,元素所需的请求大小。
- 属性