protected override void BeginProcessing() { var window = WpfWindow.OpenWindow(XamlString, Content, Options); if (PassThru) { WriteObject(window); } }
protected System.Windows.Window CreateWindow(bool reuseWindow) { System.Windows.Window window = null; if (reuseWindow) { var windows = WpfWindow.WindowList; if (windows.Count > 0) { window = windows.Last(); } } if (window == null) { window = WpfWindow.OpenWindow(null, null, null); } return(window); }