public ExtraWindow(ExtraWindowModel model, WindowSettings settings, Action closeAction) { Settings = settings; InitializeComponent(); Model = model; LoadSettings(); CreateBindings(); _closeAction = closeAction; }
public void ToExtraWindow() { Container.Items.Remove(this); MainGrid.Children.Remove(TabContent); var extraWindowModel = new ExtraWindowModel(Model.IconResource, Model.Label); var extraWindow = new ExtraWindow(extraWindowModel, Settings.WindowSettings, () => { if (MainWindow.IsShuttingDown) { return; } MainGrid.Children.Add(TabContent); Container.Items.Add(this); Focus(); Settings.IsWindowed = false; IsaacDashSerializer.MarkToSave(); }); extraWindow.Show(TabContent); extraWindow.Focus(); }