How to change label in UserControl in UserControl from another thread?
Here is my code:
this.Dispatcher.Invoke(DispatcherPriority.Input,
new DelegateMethod(() => {
App.mainWindow.FirstUserControl.SecondUserControl.txtLbl.Content = "Hello!";
}));
Error:
System.InvalidOperationException: "The thread calling this cannot access the specified object because the object is owned by another thread."