Alex Rivera | Logout

Equivalent to InvokeRequired in WPF

Asked 2011-10-14T08:55:24.493
8

Is there an equivalent to Form.InvokeRequired in WPF, e.g. Dispatcher.InvokeRequired?

Edit
Report

1 Answer

3

A possible solution that came to mind is:

if ( Dispatcher.Thread.Equals( Thread.CurrentThread ) )
{
    Action( );
}
else
{
    Dispatcher.Invoke( Action );
}
answered 2011-10-14T08:56:13.900

Your Answer