Add-Migration allocation_units angular angular6 azure Background Call build-tools core C# dell docker docker image donet ef dotnet dotnet ef @eaDir ef EntityFramework error find firewall index kill light codes linux Luci mssql msvs_version MySql network ng build node-gyp node-sass openvpn OpenWRT partitions size PK powershell Primary Key size sp_who2 sql SSH synology t-sql tables Thread ThreadPool Threads tips ubuntu Update-Database vpn windows-build-tools wpf xev xmodev

I think the most Gentleman's approach to call background method is Threadpool.

public void TheGentlemansApproach()
    // straight onto the threadpool - what could be better?
    ThreadPool.QueueUserWorkItem(_ => BackgroundMethod("The Gentleman's Approach"));

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);