/// <exclude/> protected override void OnPreviewMouseDown(MouseButtonEventArgs e) { base.OnPreviewMouseDown(e); if (DockItem != null) DockItem.Show(DockItemShowMethod.Activate); }
private static void SetAutoHideSize(DockItem dockItem, SplitterDistance value) { dockItem.AutoHideSize = value; if (DockPositionHelper.IsAutoHide(dockItem.DockPosition) && !dockItem.IsSelected) { dockItem.Show(DockItemShowMethod.Select); } }
internal sealed override void Run(DockItem dockItem, DockPane targetPane) { DockPaneNode targetPaneNode = targetPane; for (int i = 0; i < AncestorLevel; i++) { targetPaneNode = targetPaneNode.Parent; } dockItem.Show(targetPaneNode, IsAutoHide, Side, Size, IsSizeForTarget, ShowMethod); }
private static void OnMakeFloatingExecuted(object sender, ExecutedRoutedEventArgs e) { DockItem dockItem = ((AutoHideWindow)sender).DockItem; DockControl dockControl = dockItem.DockControl; FloatingWindow floatingWindow = GetFloatingWindow(dockItem); Rect floatingWindowBounds; if (floatingWindow != null) floatingWindowBounds = new Rect(floatingWindow.Left, floatingWindow.Top, floatingWindow.Width, floatingWindow.Height); else floatingWindowBounds = new Rect(new Point(double.NaN, double.NaN), dockControl.DefaultFloatingWindowSize); dockItem.Show(dockItem.DockControl, floatingWindowBounds); }
private void OnTimerTick(object sender, EventArgs e) { DockItem selectedItem = SelectedItem; if (selectedItem == null) { _timer.Stop(); } else if (!selectedItem.IsActiveItem) { if (_closingItem != null) { _closingItem.Show(DockItemShowMethod.Deselect); } else if (!IsMouseOver && !GetIsMouseOverTab(selectedItem)) { BeginClose(); } } }
void OnWorkspacesChanged(object sender, NotifyCollectionChangedEventArgs e) { if (e.NewItems != null && e.NewItems.Count != 0) { foreach (WorkspaceViewModel workspace in e.NewItems) { DockItem dockItem = new DockItem(); dockItem.HideOnPerformClose = false; dockItem.Content = workspace; dockItem.AllowedDockTreePositions = AllowedDockTreePositions.Document; dockItem.TabText = workspace.DisplayName; dockItem.Show(this, DockPosition.Document); _dockItems.Add(workspace, dockItem); } } if (e.OldItems != null && e.OldItems.Count != 0) { foreach (WorkspaceViewModel workspace in e.OldItems) { _dockItems.Remove(workspace); } } }
private void Select() { DockItem.Show(DockItemShowMethod.Select); IsMouseOverTab = true; }
internal sealed override void Run(DockItem dockItem, DockPane targetPane) { dockItem.Show(targetPane, Index, ShowMethod); }
internal sealed override void Run(DockItem dockItem, DockControl dockControl) { dockItem.Show(dockControl, DockPosition, ShowMethod); }
internal sealed override void Run(DockItem dockItem, DockControl dockControl) { dockItem.Show(dockControl, new Rect(Left, Top, Width, Height), ShowMethod); }