public DragService(LayoutFloatingWindowControl floatingWindow) { _floatingWindow = floatingWindow; _manager = floatingWindow.Model.Root.Manager; GetOverlayWindowHosts(); }
IEnumerable <IDropArea> IOverlayWindowHost.GetDropAreas(LayoutFloatingWindowControl draggingWindow) { if (_dropAreas != null) { return(_dropAreas); } _dropAreas = new List <IDropArea>(); if (draggingWindow.Model is LayoutDocumentFloatingWindow) { return(_dropAreas); } var rootVisual = (Content as FloatingWindowContentHost).RootVisual; foreach (var areaHost in rootVisual.FindVisualChildren <LayoutAnchorablePaneControl>()) { _dropAreas.Add(new DropArea <LayoutAnchorablePaneControl>( areaHost, DropAreaType.AnchorablePane)); } foreach (var areaHost in rootVisual.FindVisualChildren <LayoutDocumentPaneControl>()) { _dropAreas.Add(new DropArea <LayoutDocumentPaneControl>( areaHost, DropAreaType.DocumentPane)); } return(_dropAreas); }
/// <summary> /// Class constructor from <see cref="LayoutFloatingWindow"/> control that is using this /// service to implement its drag and drop (dock) behavior. /// </summary> /// <param name="floatingWindow"></param> public DragService(LayoutFloatingWindowControl floatingWindow) { _floatingWindow = floatingWindow; _manager = floatingWindow.Model.Root.Manager; GetOverlayWindowHosts(); }
IOverlayWindow IOverlayWindowHost.ShowOverlayWindow(LayoutFloatingWindowControl draggingWindow) { CreateOverlayWindow(); _overlayWindow.Owner = draggingWindow; _overlayWindow.EnableDropTargets(); _overlayWindow.Show(); return(_overlayWindow); }
public FloatingWindowContentHost(LayoutFloatingWindowControl owner) { _owner = owner; var manager = _owner.Model.Root.Manager; var binding = new Binding("SizeToContent") { Source = _owner }; BindingOperations.SetBinding(this, FloatingWindowContentHost.SizeToContentProperty, binding); }
IEnumerable<IDropArea> IOverlayWindowHost.GetDropAreas(LayoutFloatingWindowControl draggingWindow) { if (_areas != null) return _areas; bool isDraggingDocuments = draggingWindow.Model is LayoutDocumentFloatingWindow; _areas = new List<IDropArea>(); if (!isDraggingDocuments) { _areas.Add(new DropArea<DockingManager>( this, DropAreaType.DockingManager)); foreach (var areaHost in this.FindVisualChildren<LayoutAnchorablePaneControl>()) { if (areaHost.Model.Descendents().Any()) { _areas.Add(new DropArea<LayoutAnchorablePaneControl>( areaHost, DropAreaType.AnchorablePane)); } } } foreach (var areaHost in this.FindVisualChildren<LayoutDocumentPaneControl>()) { _areas.Add(new DropArea<LayoutDocumentPaneControl>( areaHost, DropAreaType.DocumentPane)); } foreach (var areaHost in this.FindVisualChildren<LayoutDocumentPaneGroupControl>()) { var documentGroupModel = areaHost.Model as LayoutDocumentPaneGroup; if (documentGroupModel.Children.Where(c => c.IsVisible).Count() == 0) { _areas.Add(new DropArea<LayoutDocumentPaneGroupControl>( areaHost, DropAreaType.DocumentPaneGroup)); } } return _areas; }
internal void RemoveFloatingWindow(LayoutFloatingWindowControl floatingWindow) { _fwList.Remove(floatingWindow); }
/// <inheritdoc cref="IOverlayWindow"/> void IOverlayWindow.DragLeave(LayoutFloatingWindowControl floatingWindow) { Visibility = System.Windows.Visibility.Hidden; _floatingWindow = null; }
/// <inheritdoc cref="IOverlayWindow"/> void IOverlayWindow.DragEnter(LayoutFloatingWindowControl floatingWindow) { _floatingWindow = floatingWindow; EnableDropTargets(); }
void IOverlayWindow.DragLeave(LayoutFloatingWindowControl floatingWindow) { Visibility = System.Windows.Visibility.Hidden; _floatingWindow = null; }
void IOverlayWindow.DragEnter(LayoutFloatingWindowControl floatingWindow) { _floatingWindow = floatingWindow; EnableDropTargets(); }
IOverlayWindow IOverlayWindowHost.ShowOverlayWindow(LayoutFloatingWindowControl draggingWindow) { CreateOverlayWindow(); _overlayWindow.Owner = draggingWindow; _overlayWindow.EnableDropTargets(); _overlayWindow.Show(); return _overlayWindow; }
public FloatingWindowContentHost(LayoutFloatingWindowControl owner) { _owner = owner; var manager = _owner.Model.Root.Manager; }
IEnumerable<IDropArea> IOverlayWindowHost.GetDropAreas(LayoutFloatingWindowControl draggingWindow) { if (_dropAreas != null) return _dropAreas; _dropAreas = new List<IDropArea>(); if (draggingWindow.Model is LayoutDocumentFloatingWindow) return _dropAreas; var rootVisual = (Content as FloatingWindowContentHost).RootVisual; foreach (var areaHost in rootVisual.FindVisualChildren<LayoutAnchorablePaneControl>()) { _dropAreas.Add(new DropArea<LayoutAnchorablePaneControl>( areaHost, DropAreaType.AnchorablePane)); } foreach (var areaHost in rootVisual.FindVisualChildren<LayoutDocumentPaneControl>()) { _dropAreas.Add(new DropArea<LayoutDocumentPaneControl>( areaHost, DropAreaType.DocumentPane)); } return _dropAreas; }
IOverlayWindow IOverlayWindowHost.ShowOverlayWindow(LayoutFloatingWindowControl draggingWindow) { //Debug.WriteLine("ShowOverlayWindow"); CreateOverlayWindow(); _overlayWindow.Owner = draggingWindow; _overlayWindow.EnableDropTargets(); _overlayWindow.Show(); return _overlayWindow; }
void IOverlayWindow.DragEnter(LayoutFloatingWindowControl floatingWindow) { _floatingWindow = floatingWindow; //Visibility = System.Windows.Visibility.Visible; EnableDropTargets(); }