12345678910111213141516171819202122232425262728293031323334 |
- using AvalonDock.Layout;
- using System.Windows;
- namespace PixiEditor.Views
- {
- internal class ColorPanelController
- {
- private LayoutAnchorable colorPickerPanel;
- private LayoutAnchorable colorSlidersPanel;
- private LayoutAnchorable smallColorPickerPanel;
- public ColorPanelController(LayoutAnchorable colorPickerPanel, LayoutAnchorable colorSlidersPanel, LayoutAnchorable smallColorPickerPanel)
- {
- this.colorPickerPanel = colorPickerPanel;
- this.colorSlidersPanel = colorSlidersPanel;
- this.smallColorPickerPanel = smallColorPickerPanel;
- }
- public void DeterminePanelsToDisplay()
- {
- if (SystemParameters.PrimaryScreenHeight < 1010)
- {
- colorPickerPanel.IsVisible = false;
- colorSlidersPanel.IsVisible = true;
- smallColorPickerPanel.IsVisible = true;
- }
- else
- {
- colorSlidersPanel.IsVisible = false;
- smallColorPickerPanel.IsVisible = false;
- }
- }
- }
- }
|