private void StartDialog(IProgressItemViewModel <T> itemViewModel) { DispatcherViewFactory.InvokeAsync("Secondary GUI", () => { var window = _window; if (window == null) { window = _window = PrepareProgressView(); AddProgressItem(window, itemViewModel); window.Closing += HandleWindowClosing; window.Show(); } else { AddProgressItem(window, itemViewModel); } }).ConfigureAwait(false); }
private void OnInitializationParamsChanged(TParams initParams) { DispatcherViewFactory.CreateViewContract(ThreadName, () => CreateControl(initParams)).ContinueWith( t => Content = FrameworkElementAdapters.ContractToViewAdapter(t.Result), UiThread.Current.TaskScheduler); }