AbsoluteLayout.SetLayoutBounds 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
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
适用于
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈