Hello,
I'd like to use LinkDockSite as the following.
- DockSite1 : DockSite.CanToolWindowsDock = True
- DockSite2 : DockSite.CanToolWindowsDock = False
Would you please advice how to do it?
My source code is below.
ToolWindow1 can be docked to DockSite2.
MainWindow.xaml
<Window
x:Class="LinkedDockSiteSample.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:docking="http://schemas.actiprosoftware.com/winfx/xaml/docking"
xmlns:local="clr-namespace:LinkedDockSiteSample"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="MainWindow"
mc:Ignorable="d">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<!-- DockSite1 -->
<docking:DockSite
x:Name="DockSite1"
CanToolWindowsAttach="True"
CanToolWindowsDock="True">
<docking:SplitContainer>
<docking:SplitContainer>
<docking:ToolWindowContainer>
<docking:ToolWindow Title="Tool Window 1" />
<docking:ToolWindow Title="Tool Window 2" />
</docking:ToolWindowContainer>
</docking:SplitContainer>
<docking:Workspace>
<docking:TabbedMdiHost />
</docking:Workspace>
</docking:SplitContainer>
</docking:DockSite>
<!-- DockSite2 -->
<docking:DockSite
x:Name="DockSite2"
Grid.Column="1"
CanToolWindowsAttach="False"
CanToolWindowsDock="False">
<docking:Workspace>
<docking:TabbedMdiHost>
<docking:TabbedMdiContainer>
<docking:DocumentWindow Title="Document1.txt">
<TextBox
BorderThickness="0"
Text="Move other tool windows around the 'fixed' tool window."
TextWrapping="Wrap" />
</docking:DocumentWindow>
<docking:DocumentWindow Title="Document2.txt">
<TextBox
BorderThickness="0"
Text="Move other tool windows around the 'fixed' tool window."
TextWrapping="Wrap" />
</docking:DocumentWindow>
</docking:TabbedMdiContainer>
</docking:TabbedMdiHost>
</docking:Workspace>
</docking:DockSite>
</Grid>
</Window>
MainWindow.xaml.cs
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
DockSite1.LinkDockSite(DockSite2);
}
}