ViewExtensions.FadeToAsync Method

Definition

Overloads

Name Description
FadeToAsync(VisualElement, Double, UInt32, Easing)

Returns a task that performs the fade that is described by the opacity, length, and easing parameters.

FadeToAsync(VisualElement, Double, UInt32, Easing, CancellationToken)

Returns a task that performs the fade that is described by the opacity, length, and easing parameters.

FadeToAsync(VisualElement, Double, UInt32, Easing)

Source:
ViewExtensions.cs
Source:
ViewExtensions.cs

Returns a task that performs the fade that is described by the opacity, length, and easing parameters.

public static System.Threading.Tasks.Task<bool> FadeToAsync(this Microsoft.Maui.Controls.VisualElement view, double opacity, uint length = 250, Microsoft.Maui.Easing? easing = default);
static member FadeToAsync : Microsoft.Maui.Controls.VisualElement * double * uint32 * Microsoft.Maui.Easing -> System.Threading.Tasks.Task<bool>
<Extension()>
Public Function FadeToAsync (view As VisualElement, opacity As Double, Optional length As UInteger = 250, Optional easing As Easing = Nothing) As Task(Of Boolean)

Parameters

view
VisualElement

The view on which this method operates.

opacity
Double

The opacity to fade to.

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.

Exceptions

Thrown when view is null.

Applies to

FadeToAsync(VisualElement, Double, UInt32, Easing, CancellationToken)

Returns a task that performs the fade that is described by the opacity, length, and easing parameters.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task<bool> ^ FadeToAsync(Microsoft::Maui::Controls::VisualElement ^ view, double opacity, System::UInt32 length, Microsoft::Maui::Easing ^ easing, System::Threading::CancellationToken cancellationToken);
public static System.Threading.Tasks.Task<bool> FadeToAsync(this Microsoft.Maui.Controls.VisualElement view, double opacity, uint length, Microsoft.Maui.Easing? easing, System.Threading.CancellationToken cancellationToken);
static member FadeToAsync : Microsoft.Maui.Controls.VisualElement * double * uint32 * Microsoft.Maui.Easing * System.Threading.CancellationToken -> System.Threading.Tasks.Task<bool>
<Extension()>
Public Function FadeToAsync (view As VisualElement, opacity As Double, length As UInteger, easing As Easing, cancellationToken As CancellationToken) As Task(Of Boolean)

Parameters

view
VisualElement

The view on which this method operates.

opacity
Double

The opacity to fade to.

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.

Exceptions

Thrown when view is null.

Applies to