title: AvalonDock - prevent anchorable pane docking in document pane
body: <p>Is it possible to prevent an anchorable being docked into my documents pane? I want them to be draggable and moved around the screen, but sometimes users drag them into the documents pane which makes them look poor. Then they close the tab and I can't re-open the anchorable.</p>
  
  <p>If it helps my Avalon code is below:</p>
  
  <p></p>
  
  <pre><code>        &lt;avalonDock:DockingManager.Theme&gt;
              &lt;avalonDock:VS2010Theme /&gt;
          &lt;/avalonDock:DockingManager.Theme&gt;
  
          &lt;avalonDock:DockingManager.DocumentHeaderTemplate&gt;
              &lt;DataTemplate&gt;
                  &lt;StackPanel Orientation="Horizontal"&gt;
                      &lt;StackPanel Orientation="Horizontal"&gt;
                          &lt;!-- the TextBlock named Limiter is used to limit the height of the TextBlock for the workflow name. --&gt;
                          &lt;TextBlock x:Name="Limiter" TextWrapping="NoWrap" Visibility="Hidden"
                                                         TextTrimming="CharacterEllipsis"&gt;
                                                  L
                          &lt;/TextBlock&gt;
                          &lt;TextBlock Text="{Binding Path=Title}" VerticalAlignment="Center"
                                     ToolTip="{StaticResource WorkflowTabItemToolTip}"
                                     MaxHeight="{Binding ActualHeight, ElementName=Limiter}" MaxWidth="150"
                                     TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Margin="0,0,2,0" 
                                     AutomationProperties.AutomationId="WorkflowTabTitleText"/&gt;
                          &lt;TextBlock Text=" *" 
                                     ToolTip="Has unsaved changes"
                                     Visibility="{Binding Content.UnsavedEdits, Converter={StaticResource BoolToVis}}"
                                     AutomationProperties.AutomationId="DirtyTabIndicator"/&gt;
                      &lt;/StackPanel&gt;
                  &lt;/StackPanel&gt;
              &lt;/DataTemplate&gt;
          &lt;/avalonDock:DockingManager.DocumentHeaderTemplate&gt;
  
          &lt;avalonDock:DockingManager.LayoutItemContainerStyleSelector&gt;
              &lt;utilities1:PanesStyleSelector&gt;
                  &lt;utilities1:PanesStyleSelector.WebUIStyle&gt;
                      &lt;Style TargetType="{x:Type avalonDock:LayoutAnchorableItem}"&gt;
                          &lt;Setter Property="Title" Value="{Binding Model.Title}"/&gt;
                          &lt;Setter Property="IconSource" Value="{Binding Model.IconSource}"/&gt;
                          &lt;Setter Property="Visibility" Value="{Binding Model.IsVisible, Mode=TwoWay, Converter={StaticResource BoolToVisibilityConverter}, ConverterParameter={x:Static Visibility.Hidden}}"/&gt;
                          &lt;Setter Property="ContentId" Value="{Binding Model.ContentId}"/&gt;
                          &lt;Setter Property="IsSelected" Value="{Binding Model.IsSelected, Mode=TwoWay}"/&gt;
                          &lt;Setter Property="IsActive" Value="{Binding Model.IsActive, Mode=TwoWay}"/&gt;
                      &lt;/Style&gt;
                  &lt;/utilities1:PanesStyleSelector.WebUIStyle&gt;
                  &lt;utilities1:PanesStyleSelector.DocumentStyle&gt;
                      &lt;Style TargetType="{x:Type avalonDock:LayoutItem}"&gt;
                          &lt;Setter Property="Title" Value="{Binding Model.WorkflowName}" /&gt;
                          &lt;Setter Property="IsActive" Value="{Binding Model.IsActive}" /&gt;
                          &lt;Setter Property="IsSelected" Value="{Binding Model.IsActive}" /&gt;
                      &lt;/Style&gt;
                  &lt;/utilities1:PanesStyleSelector.DocumentStyle&gt;
              &lt;/utilities1:PanesStyleSelector&gt;
          &lt;/avalonDock:DockingManager.LayoutItemContainerStyleSelector&gt;
  
          &lt;avalonDock:DockingManager.LayoutItemTemplateSelector&gt;
              &lt;utilities1:PanesTemplateSelector&gt;
                  &lt;utilities1:PanesTemplateSelector.WorkflowDesignerViewTemplate&gt;
                      &lt;DataTemplate&gt;
                          &lt;ContentControl cal:View.Model="{Binding}" IsTabStop="False" /&gt;
                      &lt;/DataTemplate&gt;
                  &lt;/utilities1:PanesTemplateSelector.WorkflowDesignerViewTemplate&gt;
                  &lt;utilities1:PanesTemplateSelector.WebUIViewTemplate&gt;
                      &lt;DataTemplate&gt;
                          &lt;ContentControl cal:View.Model="{Binding}" IsTabStop="False" /&gt;
                      &lt;/DataTemplate&gt;
                  &lt;/utilities1:PanesTemplateSelector.WebUIViewTemplate&gt;
              &lt;/utilities1:PanesTemplateSelector&gt; 
          &lt;/avalonDock:DockingManager.LayoutItemTemplateSelector&gt;
  
          &lt;avalonDock:LayoutRoot&gt;
              &lt;avalonDock:LayoutPanel Orientation="Horizontal"&gt;
                  &lt;avalonDock:LayoutDocumentPaneGroup&gt;
                      &lt;avalonDock:LayoutDocumentPane AutomationProperties.AutomationId="AvalonDocumentPane"/&gt;
                  &lt;/avalonDock:LayoutDocumentPaneGroup&gt;
                  &lt;avalonDock:LayoutAnchorablePane DockWidth="800" DockMinWidth="400" AutomationProperties.AutomationId="WebUIPane"/&gt;
                  &lt;avalonDock:LayoutAnchorablePane DockWidth="225" DockMinWidth="225" AutomationProperties.AutomationId="ActivitiesPane"&gt;
                      &lt;avalonDock:LayoutAnchorable Title="Activities" AutoHideWidth="225" AutoHideMinWidth="225" CanClose="False" CanHide="False"&gt;
                          &lt;toolbox:ToolboxControl Name="Toolbox" AutomationProperties.AutomationId="ActivitiesToolbox"
                                                          utilities1:ToolboxItemSource.ToolboxItems="{Binding ToolboxList}" /&gt;
                      &lt;/avalonDock:LayoutAnchorable&gt;
                  &lt;/avalonDock:LayoutAnchorablePane&gt;
              &lt;/avalonDock:LayoutPanel&gt;
          &lt;/avalonDock:LayoutRoot&gt;
  
      &lt;/avalonDock:DockingManager&gt;
  </code></pre>