I have the same problem, here are the changes I did:
- Firstly, I don't want the overlay icons to appears on a document when I drag an anchorables floating window:
Modify the method DockingManager.GetDropAreas to :
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));
}
}
}
if (draggingWindow is LayoutAnchorableFloatingWindowControl) // deny the possiblity to dock an anchorable with documents
return _areas;
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.Any(c => c.IsVisible))
{
_areas.Add(new DropArea<LayoutDocumentPaneGroupControl>(
areaHost,
DropAreaType.DocumentPaneGroup));
}
}
return _areas;
}
- Secondly, I don't want the user to be able to use the Commands "Dock as Tabbed Document" which appears in both the DropDownMenu and the ContextMenu of the anchorables.
a. Make the method LayoutItem.CanExecuteDockAsDocumentCommandprotected virtuaL instead of private
b. Implement it into LayoutAnchorableItem:
protected override bool CanExecuteDockAsDocumentCommand(object parameter)
{
return false;
}
I don't know if it's enough, but it seems to work for me, just try it !