Sets a theme settings for the whole application asynchronously.

Namespace: Elysium
Assembly: Elysium (in Elysium.dll) Version: 2.0.1042.4 (2.0.1042.4)


public static Task ApplyAsync(
	this Application application,
	Nullable<Theme> theme
Visual Basic
Public Shared Function ApplyAsync ( 
	application As Application,
	theme As Nullable(Of Theme)
) As Task


Type: System.Windows..::..Application
An instance of the application, whose settings are being set.
Type: System..::..Nullable<(Of <(<'Theme>)>)>
One of the values of the enumeration Theme, or null.

Return Value

Type: Task
Task instance, which allows you manage execution task thread.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Application. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).


If the parameter is null:
  1. If the parameter was set, old value will be used.
  2. If the parameter was not set, default value will be used.
Calling this method is equal to calling base method "ApplyAsync" with the value "null" for the parameters "theme","accentBrush" and "contrastBrush"


System..::..ArgumentNullException Parameter application is null.


See Also