Use MYCLASS.Dispatcher.Invoke and post code for the queue of the UI thread.
Imagine, you will fill a listbox in an async & await initialized parallel thread or in another object.
...
MyMainWindowInstance.Dispatcher.Invoke(DispatcherPriority.Normal, (Action) delegate() { MyMainWindowInstance.MyListBox.Items.Add("from parallel!!!!!!!!"); } );
...
Benefit from the best Windows Desktop app in the world and use Strokey.Net!
Keine Kommentare:
Kommentar veröffentlichen