Share via


AbsoluteLayout.GetLayoutBounds 方法

定义

重载

GetLayoutBounds(BindableObject)

获取 bindable 的布局边界。

GetLayoutBounds(IView)

GetLayoutBounds(BindableObject)

获取 bindable 的布局边界。

public:
 static Microsoft::Maui::Graphics::Rect GetLayoutBounds(Microsoft::Maui::Controls::BindableObject ^ bindable);
[System.ComponentModel.TypeConverter(typeof(Microsoft.Maui.Controls.BoundsTypeConverter))]
public static Microsoft.Maui.Graphics.Rect GetLayoutBounds (Microsoft.Maui.Controls.BindableObject bindable);
[<System.ComponentModel.TypeConverter(typeof(Microsoft.Maui.Controls.BoundsTypeConverter))>]
static member GetLayoutBounds : Microsoft.Maui.Controls.BindableObject -> Microsoft.Maui.Graphics.Rect
Public Shared Function GetLayoutBounds (bindable As BindableObject) As Rect

参数

bindable
BindableObject

可视元素。

返回

该对象的布局边界。

属性

注解

此方法支持 AbsoluteLayout.LayoutBounds XAML 附加属性。 在 XAML 中,应用程序开发人员可以指定一个逗号分隔的列表(可能包含空格),其中包含四个值,用于指定边界矩形的位置和维度。 列表中的前两个值必须表示数字。 后两个值可以是数字,也可以是字符串“AutoSize”。 AbsoluteLayout.LayoutFlags附加属性确定如何解释列表中的值以创建边界矩形。

适用于

GetLayoutBounds(IView)

public:
 virtual Microsoft::Maui::Graphics::Rect GetLayoutBounds(Microsoft::Maui::IView ^ view);
public Microsoft.Maui.Graphics.Rect GetLayoutBounds (Microsoft.Maui.IView view);
abstract member GetLayoutBounds : Microsoft.Maui.IView -> Microsoft.Maui.Graphics.Rect
override this.GetLayoutBounds : Microsoft.Maui.IView -> Microsoft.Maui.Graphics.Rect
Public Function GetLayoutBounds (view As IView) As Rect

参数

view
IView

返回

实现

适用于