public void Show() { _layoutPreview = new LayoutPreview { IsActualSize = true, Opacity = 0.5, }; ShowLayout(); OpenMainWindow(); }
public void CloseEditor() { _editor = null; _layoutPreview = new LayoutPreview { IsActualSize = true, Opacity = 0.5, }; CurrentLayoutWindow.Content = _layoutPreview; OpenMainWindow(); }
public void ShowLayoutPicker() { DataContext = null; _editor = null; _layoutPreview = new LayoutPreview(); _layoutPreview.IsActualSize = true; _layoutPreview.Opacity = 0.5; Content = _layoutPreview; MainWindow window = new MainWindow(); window.Owner = this; window.Show(); }
public void ShowLayoutPicker() { DataContext = null; _editor = null; _layoutPreview = new LayoutPreview(); _layoutPreview.IsActualSize = true; _layoutPreview.Opacity = 0.5; Content = _layoutPreview; MainWindow window = new MainWindow(); window.Owner = this; window.ShowActivated = true; window.Topmost = true; window.Show(); // window is set to topmost to make sure it shows on top of PowerToys settings page // we can reset topmost flag now window.Topmost = false; }
public void OpenEditor(LayoutModel model) { _layoutPreview = null; if (CurrentDataContext is GridLayoutModel) { _editor = new GridEditor(); } else if (CurrentDataContext is CanvasLayoutModel) { _editor = new CanvasEditor(); } CurrentLayoutWindow.Content = _editor; EditorWindow window; bool isGrid = false; if (model is GridLayoutModel) { window = new GridEditorWindow(); isGrid = true; } else { window = new CanvasEditorWindow(); } window.Owner = Monitors[App.Overlay.CurrentDesktop].Window; window.DataContext = model; window.Show(); if (isGrid) { (window as GridEditorWindow).NameTextBox().Focus(); } window.LeftWindowCommands = null; window.RightWindowCommands = null; }