Dispatcher.CurrentDispatcher?

Posted by Mark on Stack Overflow See other posts from Stack Overflow or by Mark
Published on 2010-05-08T01:02:59Z Indexed on 2010/05/08 1:08 UTC
Read the original article Hit count: 223

Filed under:
|
|

If I do this...

public PriorityQueue(Dispatcher dispatcher = null)
{
    this.dispatcher = dispatcher ?? Dispatcher.CurrentDispatcher;
}

And then use it in a ViewModel (without passing any args) that is created through the XAML, this.dispatcher will point to the UI thread right?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about c#