public bool PromptForPreviewAcceptance(IEnumerable <PreviewResult> actions) { var result = false; if (actions.Any()) { UIDispatcher.Invoke(() => { var w = new PreviewWindow(_context); w.DataContext = new PreviewWindowModel(actions); if (StandaloneSwitch.IsRunningStandalone && _detailControl != null) { var win = Window.GetWindow(_detailControl); w.Owner = win; } result = w.ShowModal() == true; }); } else { return(true); } return(result); }
public bool PromptForPreviewAcceptance(IEnumerable<PreviewResult> actions) { var result = false; if (actions.Any()) { InvokeOnUIThread(() => { var w = new PreviewWindow(UIContext); w.DataContext = new PreviewWindowModel(actions); result = w.ShowModal() == true; }); } else { return true; } return result; }
public bool PromptForPreviewAcceptance(IEnumerable <PreviewResult> actions) { var result = false; if (actions.Any()) { UIDispatcher.Invoke(() => { var w = new PreviewWindow(UIContext); w.DataContext = new PreviewWindowModel(actions); result = w.ShowModal() == true; }); } else { return(true); } return(result); }
public bool PromptForPreviewAcceptance(IEnumerable<PreviewResult> actions) { bool result = false; UIDispatcher.Invoke(() => { var w = new PreviewWindow(); w.DataContext = new PreviewWindowModel(actions); if (StandaloneSwitch.IsRunningStandalone && DetailControl != null) { Window win = Window.GetWindow(DetailControl); w.Owner = win; } result = w.ShowModal() == true; }); return result; }