Share via


AbsoluteLayout.SetLayoutBounds 方法

定义

重载

SetLayoutBounds(BindableObject, Rect)

设置视图的布局边界,用于在进行布局时调整大小。

SetLayoutBounds(IView, Rect)

SetLayoutBounds(BindableObject, Rect)

设置视图的布局边界,用于在进行布局时调整大小。

public:
 static void SetLayoutBounds(Microsoft::Maui::Controls::BindableObject ^ bindable, Microsoft::Maui::Graphics::Rect bounds);
public static void SetLayoutBounds (Microsoft.Maui.Controls.BindableObject bindable, Microsoft.Maui.Graphics.Rect bounds);
static member SetLayoutBounds : Microsoft.Maui.Controls.BindableObject * Microsoft.Maui.Graphics.Rect -> unit
Public Shared Sub SetLayoutBounds (bindable As BindableObject, bounds As Rect)

参数

bindable
BindableObject

bounds 为界的视图。

bounds
Rect

表示 bindable 的所需大小和形状的矩形。

注解

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

适用于

SetLayoutBounds(IView, Rect)

public:
 void SetLayoutBounds(Microsoft::Maui::IView ^ view, Microsoft::Maui::Graphics::Rect bounds);
public void SetLayoutBounds (Microsoft.Maui.IView view, Microsoft.Maui.Graphics.Rect bounds);
member this.SetLayoutBounds : Microsoft.Maui.IView * Microsoft.Maui.Graphics.Rect -> unit
Public Sub SetLayoutBounds (view As IView, bounds As Rect)

参数

view
IView
bounds
Rect

适用于