/// <summary> /// Initializes a new instance of the <see cref="DragManager"/> class. /// </summary> /// <param name="dockControl">The <see cref="DockControl"/>.</param> /// <exception cref="ArgumentNullException"> /// <paramref name="dockControl"/> is <see langword="null"/>. /// </exception> internal DragManager(DockControl dockControl) { if (dockControl == null) { throw new ArgumentNullException(nameof(dockControl)); } _dockControl = dockControl; Reset(); // Register event handlers. ((INotifyCollectionChanged)_dockControl.DockTabPanes).CollectionChanged += OnDockTabPanesChanged; }
/// <summary> /// Gets the primary DockWidth/DockHeight value for the given element. /// </summary> private static GridLength GetPrimaryDockSize(DependencyObject element, Orientation orientation) { if (element == null) { return(GridLength.Auto); } return((orientation == Orientation.Vertical) ? DockControl.GetDockHeight(element) : DockControl.GetDockWidth(element)); }
internal static IDockControl GetViewModel(this DockControl view) { return(GetViewModel <IDockControl>(view)); }