Disable drop targets (layouts) in Avalondock

Viewed 1729

I am using the open source library AvalonDock to support drag and drop of multiple tabs (panes) outside and back to the MainWindow and I want to disable most of the possible drop targets (or lets say layouts) like placing a tab below another or placing tabs side by side. In other words I only want to allow placing tabs in a "row of tabs" like in firefox or chrome browser.

Is there any property to disable drop targets (layouts) and if yes, can you please provide me with a short code example?

Here is a simple example of an MainWindow with three dockable panes (LayoutDocuments), which look like the TabItems of the standard TabControl of WPF (sorry, I could not post a screenshot of this):

<Window x:Class="TabTest.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:xcad="http://schemas.xceed.com/wpf/xaml/avalondock"
        Height="300" Width="300">
    <Grid>
        <xcad:DockingManager VerticalAlignment="Stretch">
            <xcad:LayoutRoot>
                <xcad:LayoutPanel>
                    <xcad:LayoutDocumentPane>
                        <xcad:LayoutDocument Title="Doc1">
                        </xcad:LayoutDocument>
                        <xcad:LayoutDocument Title="Doc2">
                        </xcad:LayoutDocument>
                        <xcad:LayoutDocument Title="Doc3">
                        </xcad:LayoutDocument>
                    </xcad:LayoutDocumentPane>
                </xcad:LayoutPanel>
            </xcad:LayoutRoot>
        </xcad:DockingManager>
    </Grid>
</Window>

Thanks for your help!

2 Answers
Related