You can grab the UI Dispatcher from the static application instance: Application.Current.Dispatcher
You may want to check Application.Current
for null first, as it can be cleared during a shutdown sequence.
More Related Contents:
- WPF BackgroundWorker vs. Dispatcher
- How to deal with cross-thread access exceptions?
- The calling thread must be STA, because many UI components require this
- Change WPF controls from a non-main thread using Dispatcher.Invoke
- How do I create and show WPF windows on separate threads?
- The calling thread cannot access this object because a different thread owns it.WPF [duplicate]
- Does WPF databinding marshall changes to the UI Thread?
- “The calling thread must be STA, because many UI components require this” error when creating a WPF pop-up Window in thread
- WPF Databinding thread safety?
- Is it possible to initialize WPF UserControls in different threads?
- Force redraw before long running operations
- How to update UI from another thread running in another class
- Can I use a different Template for the selected item in a WPF ComboBox than for the items in the dropdown part?
- What framework for MVVM should I use? [closed]
- How to create a semi transparent window in WPF that allows mouse events to pass through
- WPF: Canvas mouse events not firing on empty space
- What is the difference between x:Reference and ElementName?
- DropShadow for WPF Borderless Window
- Make WPF Image load async
- How to autosize and right-align GridViewColumn data in WPF?
- Setting design time DataContext on a Window is giving a compiler error?
- How to use IDataErrorInfo.Error in a WPF program?
- Advanced XAML Animation effects. Pulse, Marching ants, Rotations. Alerts
- WPF : dynamic view/content
- HorizontalAlignment=Stretch, MaxWidth, and Left aligned at the same time?
- WPF: ItemsControl with scrollbar (ScrollViewer)
- WPF MvvM DataGrid Dynamic Columns
- WPF DataGrid : CanContentScroll property causing odd behavior
- Can you use a Binding ValidationRule within 1 line in xaml?
- How to automatically scale font size for a group of controls?