Dispatcher The dispatcher maintains a priority work item queue for a specific thread. This can help you upgrade your user interface. If you have a lot of user interface initialization, even this will not help you.
Dispatcher is not always an alternative to BackgroundWorker. The best practice is to choose the one that suits your requirements best. For example, if you want something to run without a queue, BackgroundWorker is the solution. On the other hand, if priority is not an issue, Dispatcher is an alternative. For example, the dispatcher uses Spell checkers and syntax highlighting functions.
WPF Stream Model
All WPF applications start with two important threads: one for rendering and one for managing the user interface. Thread rendering is a hidden thread that runs in the background, so the only thread you usually access is the user interface thread. WPF requires that most of its objects are bound to a user interface thread. This is called thread affinity, that is, you can only use the WPF object in the stream on which it was created. Using it on other threads will throw an exception to execute. Please note that the WPF streaming model works well with the Win32® APIs. This means that WPF can host or be hosted by any HWND interface (Windows Forms, Visual Basic®, MFC, or even Win32).
The affinity of the thread is handled by the class manager, a priority message loop for WPF applications. As a rule, your WPF projects have one Dispatcher object (and, therefore, one UI) through which all work with the user interface is carried out.
NOTE:
The main difference between the Dispatcher method and other threads is that the dispatcher is actually not multithreaded. The dispatcher controls the controls that need a single thread to work properly; BeginInvoke method for event queue manager for later execution (depending on priority, etc.), but still in the same topic.
See this for more details.
source share