ViewExtensions.LayoutToAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| LayoutToAsync(VisualElement, Rect, UInt32, Easing) |
Obsolete.
view
to the rectangle that is specified by the bounds parameter. |
| LayoutToAsync(VisualElement, Rect, UInt32, Easing, CancellationToken) |
Obsolete.
Returns a task that eases the bounds of the VisualElement that is specified by the |
LayoutToAsync(VisualElement, Rect, UInt32, Easing)
- Source:
- ViewExtensions.cs
- Source:
- ViewExtensions.cs
Caution
Use Translation to animate layout changes.
view
to the rectangle that is specified by the bounds parameter.[System.Obsolete("Use Translation to animate layout changes.")]
public static System.Threading.Tasks.Task<bool> LayoutToAsync(this Microsoft.Maui.Controls.VisualElement view, Microsoft.Maui.Graphics.Rect bounds, uint length = 250, Microsoft.Maui.Easing? easing = default);
[<System.Obsolete("Use Translation to animate layout changes.")>]
static member LayoutToAsync : Microsoft.Maui.Controls.VisualElement * Microsoft.Maui.Graphics.Rect * uint32 * Microsoft.Maui.Easing -> System.Threading.Tasks.Task<bool>
<Extension()>
Public Function LayoutToAsync (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
LayoutToAsync(VisualElement, Rect, UInt32, Easing, CancellationToken)
Caution
Use Translation to animate layout changes.
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.
public:
[System::Runtime::CompilerServices::Extension]
static System::Threading::Tasks::Task<bool> ^ LayoutToAsync(Microsoft::Maui::Controls::VisualElement ^ view, Microsoft::Maui::Graphics::Rect bounds, System::UInt32 length, Microsoft::Maui::Easing ^ easing, System::Threading::CancellationToken cancellationToken);
[System.Obsolete("Use Translation to animate layout changes.")]
public static System.Threading.Tasks.Task<bool> LayoutToAsync(this Microsoft.Maui.Controls.VisualElement view, Microsoft.Maui.Graphics.Rect bounds, uint length, Microsoft.Maui.Easing? easing, System.Threading.CancellationToken cancellationToken);
[<System.Obsolete("Use Translation to animate layout changes.")>]
static member LayoutToAsync : Microsoft.Maui.Controls.VisualElement * Microsoft.Maui.Graphics.Rect * uint32 * Microsoft.Maui.Easing * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
<Extension()>
Public Function LayoutToAsync (view As VisualElement, bounds As Rect, length As UInteger, easing As Easing, cancellationToken As CancellationToken) 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.
- cancellationToken
- CancellationToken
A CancellationToken to cancel 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.