I am trying to implement two tool windows within a auto hide left structure. I patterned what I did after one of your samples.
Here is the XAML from your sample:
<docking:DockSite.AutoHideLeftContainers>
<docking:ToolWindowContainer>
<docking:ToolWindow x:Name="toolboxToolWindow" Title="Toolbox" ImageSource="/Resources/Images/Toolbox16.png">
<TextBlock Margin="3" Text="Place toolbox items here." />
</docking:ToolWindow>
</docking:ToolWindowContainer>
<docking:ToolWindowContainer>
<docking:ToolWindow x:Name="toolWindowDockingToolWindow" Title="Tool Window Docking" ImageSource="/Resources/Images/Properties16.png">
<Border Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel Margin="7">
<TextBlock Text="Tool Windows (Open in bold):" TextWrapping="Wrap" />
<ListBox x:Name="toolWindowsListBox" Margin="0,3,0,0" Height="150" ItemsSource="{Binding ElementName=dockSite, Path=ToolWindows}" SelectedIndex="0">
<ListBox.ItemTemplate>
<DataTemplate DataType="docking:ToolWindow">
<TextBlock x:Name="title" Text="{Binding Title}" />
<DataTemplate.Triggers>
<DataTrigger Binding="{Binding IsOpen}" Value="True">
<Setter TargetName="title" Property="FontWeight" Value="Bold" />
</DataTrigger>
</DataTemplate.Triggers>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<TextBlock Margin="0,7,0,0" Text="Actions affect selected tool window in list above:" TextWrapping="Wrap" />
<WrapPanel Margin="0,3,0,0">
<Button Content="Activate" Command="docking:DockingCommands.ActivateWindow"
CommandTarget="{Binding ElementName=toolWindowsListBox, Path=SelectedItem}" />
<Button Content="Open" Command="docking:DockingCommands.OpenWindow"
CommandTarget="{Binding ElementName=toolWindowsListBox, Path=SelectedItem}" />
<Button Content="Close" Command="docking:DockingCommands.CloseWindow"
CommandTarget="{Binding ElementName=toolWindowsListBox, Path=SelectedItem}" />
<Button Content="Destroy" Click="OnDestroyToolWindowButtonClick" />
</WrapPanel>
<WrapPanel Margin="0,3,0,0">
<TextBlock Text="Direction " VerticalAlignment="Center" />
<ComboBox x:Name="programmaticDockDirectionComboBox" SelectedIndex="3"
ItemsSource="{Binding Source={StaticResource DirectionObjectDataProvider}}" />
<Button Content="Dock to DockSite" Click="OnProgrammaticDockToDockSiteButtonClick" />
<Button Content="Dock to Solution Explorer" Click="OnProgrammaticDockToSolutionExplorerButtonClick" />
</WrapPanel>
<GroupBox Header="Float" Margin="0,7,0,0" Padding="3,2,3,0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="3" />
<RowDefinition Height="Auto" />
<RowDefinition Height="3" />
<RowDefinition Height="Auto" />
<RowDefinition Height="3" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="3" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Text="Position:" HorizontalAlignment="Right" VerticalAlignment="Center" />
<editors:PointEditBox x:Name="floatPositionEditBox" Grid.Column="2"
CheckBoxVisibility="Visible" InitialValue="100,100" />
<TextBlock Text="Size:" Grid.Row="2" HorizontalAlignment="Right"
VerticalAlignment="Center" />
<editors:SizeEditBox x:Name="floatSizeEditBox" Grid.Row="2" Grid.Column="2"
CheckBoxVisibility="Visible" InitialValue="200, 300" />
<TextBlock Text="Behavior:" Grid.Row="4" HorizontalAlignment="Right"
VerticalAlignment="Center" />
<ComboBox x:Name="floatSizingBehaviorComboBox" Grid.Row="4" Grid.Column="2"
SelectedIndex="0"
ItemsSource="{Binding Source={StaticResource FloatSizingBehaviorObjectDataProvider}}" />
<Button Grid.Row="6" Grid.ColumnSpan="3" HorizontalAlignment="Right"
Content="Float" Click="OnFloatToolWindowButtonClick" />
</Grid>
</GroupBox>
</StackPanel>
</ScrollViewer>
</Border>
</docking:ToolWindow>
</docking:ToolWindowContainer>
</docking:DockSite.AutoHideLeftContainers>
Here is the XAML from my application:
<docking:DockSite.AutoHideLeftContainers>
<docking:ToolWindowContainer x:Name="DataAcquisitionToolWindowContainer" docking:DockSite.ControlSize="750,600">
<docking:ToolWindow x:Name="InstrumentControlToolWindow" Background="{DynamicResource FixedPanelBackground}"
Title="{x:Static properties:Resources.InstrumentControlTitle}" Style="{DynamicResource ToolWindowStyle}">
<views:InstrumentControlView x:Name="InstrumentControlView"/>
</docking:ToolWindow>
</docking:ToolWindowContainer>
<docking:ToolWindowContainer docking:DockSite.ControlSize="750,600">
<docking:ToolWindow x:Name="LiveDataWindow" Title="{x:Static properties:Resources.LiveData}" Style="{DynamicResource ToolWindowStyle}">
<views:LiveDataView x:Name="LiveDataView"/>
</docking:ToolWindow>
</docking:ToolWindowContainer>
</docking:DockSite.AutoHideLeftContainers>
As you can see, both have two tool windows within the container. When I start the application, both tool windows show up as collapsed on the left side, as they should according to my understanding. The problem I am having is as follows: If I "unhide" and pin both windows and then unpin them, the one on the right gets "hidden" on the right side instead of on the left side. Is there anything special I have to do to get this window to "rehide" properly back on the left side?
Thanks.