Example Runspace help

Im trying to now make my WPF UI more responsive and have tried following the below on how to use runspaces

however im struggling with how i apply the above to how posh tools sets up my xaml and event handlers etc