Share via


ViewExtensions.LayoutTo(VisualElement, Rect, UInt32, Easing) Method

Definition

Caution

Please use LayoutToAsync instead.

Returns a task that eases the bounds of the VisualElement that is specified by the view to the rectangle that is specified by the bounds parameter.
[System.Obsolete("Please use LayoutToAsync instead.")]
public static System.Threading.Tasks.Task<bool> LayoutTo(this Microsoft.Maui.Controls.VisualElement view, Microsoft.Maui.Graphics.Rect bounds, uint length = 250, Microsoft.Maui.Easing? easing = default);
public static System.Threading.Tasks.Task<bool> LayoutTo(this Microsoft.Maui.Controls.VisualElement view, Microsoft.Maui.Graphics.Rect bounds, uint length = 250, Microsoft.Maui.Easing? easing = default);
[<System.Obsolete("Please use LayoutToAsync instead.")>]
static member LayoutTo : Microsoft.Maui.Controls.VisualElement * Microsoft.Maui.Graphics.Rect * uint32 * Microsoft.Maui.Easing -> System.Threading.Tasks.Task<bool>
static member LayoutTo : Microsoft.Maui.Controls.VisualElement * Microsoft.Maui.Graphics.Rect * uint32 * Microsoft.Maui.Easing -> System.Threading.Tasks.Task<bool>
<Extension()>
Public Function LayoutTo (view As VisualElement, bounds As Rect, Optional length As UInteger = 250, Optional easing As Easing = Nothing) As Task(Of Boolean)

Parameters

view
VisualElement

The view on which this method operates.

bounds
Rect

The layout bounds.

length
UInt32

The time, in milliseconds, over which to animate the transition. The default is 250.

easing
Easing

The easing function to use for the animation.

Returns

A Task containing a Boolean value which indicates whether the animation was canceled. true indicates that the animation was canceled. false indicates that the animation ran to completion.

Attributes

Exceptions

Thrown when view is null.

Applies to