public void ApplyTo(DockPanel dockPanel) { if (dockPanel.Panes.Count > 0) { throw new InvalidOperationException("Before applying themes all panes must be closed."); } if (dockPanel.FloatWindows.Count > 0) { throw new InvalidOperationException("Before applying themes all float windows must be closed."); } if (dockPanel.Contents.Count > 0) { throw new InvalidOperationException("Before applying themes all dock contents must be closed."); } if (ColorPalette == null) { dockPanel.ResetDummy(); } else { _dockBackColor = dockPanel.DockBackColor; dockPanel.DockBackColor = ColorPalette.MainWindowActive.Background; dockPanel.SetDummy(); } _showAutoHideContentOnHover = dockPanel.ShowAutoHideContentOnHover; dockPanel.ShowAutoHideContentOnHover = ShowAutoHideContentOnHover; }
public void ApplyTo(DockPanel dockPanel) { if (Extender.AutoHideStripFactory == null || Extender.AutoHideWindowFactory == null || Extender.DockIndicatorFactory == null || Extender.DockOutlineFactory == null || Extender.DockPaneCaptionFactory == null || Extender.DockPaneFactory == null || Extender.DockPaneSplitterControlFactory == null || Extender.DockPaneStripFactory == null || Extender.DockWindowFactory == null || Extender.FloatWindowFactory == null || Extender.PaneIndicatorFactory == null || Extender.PanelIndicatorFactory == null || Extender.WindowSplitterControlFactory == null) { throw new InvalidOperationException(Strings.Theme_MissingFactory); } if (dockPanel.Panes.Count > 0) { throw new InvalidOperationException(Strings.Theme_PaneNotClosed); } if (dockPanel.FloatWindows.Count > 0) { throw new InvalidOperationException(Strings.Theme_FloatWindowNotClosed); } if (dockPanel.Contents.Count > 0) { throw new InvalidOperationException(Strings.Theme_DockContentNotClosed); } if (ColorPalette == null) { dockPanel.ResetDummy(); } else { _dockBackColor = dockPanel.DockBackColor; dockPanel.DockBackColor = ColorPalette.MainWindowActive.Background; dockPanel.SetDummy(); } _showAutoHideContentOnHover = dockPanel.ShowAutoHideContentOnHover; dockPanel.ShowAutoHideContentOnHover = ShowAutoHideContentOnHover; }
public void ApplyTo(DockPanel dockPanel) { if (Extender.AutoHideStripFactory == null || Extender.AutoHideWindowFactory == null || Extender.DockIndicatorFactory == null || Extender.DockOutlineFactory == null || Extender.DockPaneCaptionFactory == null || Extender.DockPaneFactory == null || Extender.DockPaneSplitterControlFactory == null || Extender.DockPaneStripFactory == null || Extender.DockWindowFactory == null || Extender.FloatWindowFactory == null || Extender.PaneIndicatorFactory == null || Extender.PanelIndicatorFactory == null || Extender.WindowSplitterControlFactory == null) { throw new InvalidOperationException("Before applying themes all factories must be configured."); } if (dockPanel.Panes.Count > 0) { throw new InvalidOperationException("Before applying themes all panes must be closed."); } if (dockPanel.FloatWindows.Count > 0) { throw new InvalidOperationException("Before applying themes all float windows must be closed."); } if (dockPanel.Contents.Count > 0) { throw new InvalidOperationException("Before applying themes all dock contents must be closed."); } if (ColorPalette == null) { dockPanel.ResetDummy(); } else { _dockBackColor = dockPanel.DockBackColor; dockPanel.DockBackColor = ColorPalette.MainWindowActive.Background; dockPanel.SetDummy(); } _showAutoHideContentOnHover = dockPanel.ShowAutoHideContentOnHover; dockPanel.ShowAutoHideContentOnHover = ShowAutoHideContentOnHover; }