Dev2.CustomControls.Progress.ProgressFileDownloader.DialogViewModel C# (CSharp) Method

DialogViewModel() private method

private DialogViewModel ( Window owner, System.Action cancelAction ) : IProgressNotifier
owner System.Windows.Window
cancelAction System.Action
return IProgressNotifier
        static IProgressNotifier DialogViewModel(Window owner, Action cancelAction)
        {
            var dialog = new ProgressDialog(owner);
            dialog.Closed += (sender, args) => cancelAction();
            var dialogViewModel = new ProgressDialogViewModel(cancelAction, dialog.Show, dialog.Close);
            dialog.DataContext = dialogViewModel;
            return dialogViewModel;
        }