Could someone tell me in simple layman terms, what a WPF Dispatcher object is?
Also, I sometimes see this line of code in the constructor of an object. What does Dispatcher.CurrentDispatcher represent?
Dispatcher dispatcher = Dispatcher.CurrentDispatcher;
I know this has got something to do with making sure you don’t access objects from a thread different from the thread that owns the object, but I’m having trouble wrapping my head around exactly what a Dispatcher is/does.
I think the MSDN page should give a good description, in short:
And the
CurrentDispatcher: