To be able to change anything from another thread on the WPF window, you can use the Dispatcher.

 

Define function inside Your CodeBehind or ModeView

private void InvokeOnWindow(Action action)
{
    System.Windows.Application.Current.Dispatcher.Invoke(DispatcherPriority.Background, action);
}

using:

InvokeOnWindow(()=>{SomeProperty="Value"});

Comments

Be the first to post a comment

Post a comment