Edit

Share via


CompositionTargetHelper.ExecuteAfterCompositionRenderingAsync Method

Definition

Overloads

ExecuteAfterCompositionRenderingAsync(Action)

Provides a method to execute code after the rendering pass is completed. https://github.com/microsoft/microsoft-ui-xaml/blob/c045cde57c5c754683d674634a0baccda34d58c4/dev/dll/SharedHelpers.cpp#L399

ExecuteAfterCompositionRenderingAsync(Action, Nullable<TaskCreationOptions>)

Provides a method to execute code after the rendering pass is completed. https://github.com/microsoft/microsoft-ui-xaml/blob/c045cde57c5c754683d674634a0baccda34d58c4/dev/dll/SharedHelpers.cpp#L399https://devblogs.microsoft.com/premier-developer/the-danger-of-taskcompletionsourcet-class/

ExecuteAfterCompositionRenderingAsync(Action)

public static System.Threading.Tasks.Task<bool> ExecuteAfterCompositionRenderingAsync (Action action);
static member ExecuteAfterCompositionRenderingAsync : Action -> System.Threading.Tasks.Task<bool>
Public Shared Function ExecuteAfterCompositionRenderingAsync (action As Action) As Task(Of Boolean)

Parameters

action
Action

Action to be executed after render pass

Returns

Awaitable Task

Applies to

ExecuteAfterCompositionRenderingAsync(Action, Nullable<TaskCreationOptions>)

public static System.Threading.Tasks.Task<bool> ExecuteAfterCompositionRenderingAsync (Action action, System.Threading.Tasks.TaskCreationOptions? options = default);
static member ExecuteAfterCompositionRenderingAsync : Action * Nullable<System.Threading.Tasks.TaskCreationOptions> -> System.Threading.Tasks.Task<bool>
Public Shared Function ExecuteAfterCompositionRenderingAsync (action As Action, Optional options As Nullable(Of TaskCreationOptions) = Nothing) As Task(Of Boolean)

Parameters

action
Action

Action to be executed after render pass

options
Nullable<TaskCreationOptions>

TaskCreationOptions for how to handle async calls with TaskCompletionSource<TResult>.

Returns

Awaitable Task

Applies to