void Refresh() { if (DockControl == null) { return; } LeftSplitterWidth = ConvertSplitterSize(DockControl.LeftDockTree.IsVisible); RightSplitterWidth = ConvertSplitterSize(DockControl.RightDockTree.IsVisible); TopSplitterHeight = ConvertSplitterSize(DockControl.TopDockTree.IsVisible); BottomSplitterHeight = ConvertSplitterSize(DockControl.BottomDockTree.IsVisible); IsLeftGuideVisible = DockManager.GetShowsLeftGuide(DockControl); IsRightGuideVisible = DockManager.GetShowsRightGuide(DockControl); IsTopGuideVisible = DockManager.GetShowsTopGuide(DockControl); IsBottomGuideVisible = DockManager.GetShowsBottomGuide(DockControl); IsDocumentGuideVisible = DockManager.GetShowsFillGuide(DockControl); LeftTreeWidth = RightTreeWidth = TopTreeHeight = BottomTreeHeight = new GridLength(); DockTreeClient dockTreeClient = FindVisualChild <DockTreeClient>(DockControl); foreach (DockTreeControl dockTreeControl in FindVisualChildren <DockTreeControl>(dockTreeClient)) { DockTree dockTree = dockTreeControl.DockTree; if (dockTree == null) { continue; } if (dockTree.Position == DockTreePosition.Left) { LeftTreeWidth = new GridLength(dockTreeControl.ActualWidth); } else if (dockTree.Position == DockTreePosition.Right) { RightTreeWidth = new GridLength(dockTreeControl.ActualWidth); } else if (dockTree.Position == DockTreePosition.Top) { TopTreeHeight = new GridLength(dockTreeControl.ActualHeight); } else if (dockTree.Position == DockTreePosition.Bottom) { BottomTreeHeight = new GridLength(dockTreeControl.ActualHeight); } } }