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)

Syntax

C#
public static Task ApplyAsync(
	this Application application,
	SolidColorBrush accentBrush,
	SolidColorBrush contrastBrush
)
Visual Basic
<ExtensionAttribute> 
Public Shared Function ApplyAsync ( 
	application As Application,
	accentBrush As SolidColorBrush,
	contrastBrush As SolidColorBrush
) As Task

Parameters

application
Type: System.Windows..::..Application
An instance of the application, whose settings are being set.
accentBrush
Type: System.Windows.Media..::..SolidColorBrush
A brush, which contains an accent colour, or null.
contrastBrush
Type: System.Windows.Media..::..SolidColorBrush
A brush, which contains a contrast colour, 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).

Remarks

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 "apply" with "theme" parameter = null.

Exceptions

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

Contracts

See Also