Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DispatcherExtensions.Invoke Method (Dispatcher, Action, DispatcherPriority)

 

Executes the specified delegate synchronously with the specified priority on the thread that the specified Dispatcher was created on.

Namespace:   System.Windows.Threading
Assembly:  System.Windows.Presentation (in System.Windows.Presentation.dll)

[BrowsableAttribute(false)]
public static void Invoke(
	this Dispatcher dispatcher,
	Action action,
	DispatcherPriority priority
)

Parameters

dispatcher
Type: System.Windows.Threading.Dispatcher

The dispatcher that executes the delegate.

action
Type: System.Action

The delegate to execute, which takes no arguments and does not return a value.

priority
Type: System.Windows.Threading.DispatcherPriority

The execution priority of the delegate relative to other pending operations in the Dispatcher event queue.

Exception Condition
ArgumentNullException

action is null.

ArgumentException

priority is equal to Inactive.

InvalidEnumArgumentException

priority is not a valid DispatcherPriority.

.NET Framework
Available since 3.5
Return to top
Show:
© 2017 Microsoft