共用方式為


AbsoluteLayout.SetLayoutBounds Method

Definition

Overloads

SetLayoutBounds(BindableObject, Rect)

Sets the layout bounds of a view that will be used to size it when it is layed out.

SetLayoutBounds(IView, Rect)

SetLayoutBounds(BindableObject, Rect)

Source:
AbsoluteLayout.cs
Source:
AbsoluteLayout.cs

Sets the layout bounds of a view that will be used to size it when it is layed out.

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)

Parameters

bindable
BindableObject

The view to delimit by bounds.

bounds
Rect

A rectangle that represents the desired size and shape of bindable.

Remarks

This method supports the AbsoluteLayout.LayoutBounds XAML attached property. In XAML, Application developers can specify a comma-separated list—possibly with spaces—of four values that specify the bounding rectangle's position and dimensions. The first two values in the list must represent numbers. The latter two values may each either be numbers, or the string "AutoSize". The AbsoluteLayout.LayoutFlags attached property determines how the values in the list are interpreted to create the bounding rectangle. Application developers can call this method to update the layout of a view after it is added.

Applies to

SetLayoutBounds(IView, Rect)

Source:
AbsoluteLayout.cs
Source:
AbsoluteLayout.cs
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)

Parameters

view
IView
bounds
Rect

Applies to