Dec 7, 2011 at 7:29 PM
Edited Dec 7, 2011 at 9:00 PM

I've been using AvalonDock for quite a while now and I've never been able to overcome some focus problems. In my DockingManager I have three panes each containing a WPF DockableContent with a ContentControl inside. The ContentControl has a DockPanel inside of it. Anytime I want to edit the value of a control inside the DockPanel I have to select the pane first (unless I am already in that pane). I'm not sure if my WPF bindings are causing the problem or if it is something else. Any suggestions?

EDIT: I noticed this is only a problem when I use ContentControl. See below.

<ad:DockingManager Grid.Row="0" x:Name="DockingManager" Margin="11" Background="#FF6591CD">

<ad:ResizingPanel Orientation="Horizontal">

<ad:ResizingPanel Orientation="Vertical" ad:ResizingPanel.ResizeWidth="0.25*">

<ad:DockablePane Background="White" ad:ResizingPanel.ResizeHeight="0.75*">

<ad:DockableContent x:Name="projectTreePane" Title="Projects" DockableStyle="DockableToBorders" IsCloseable="False" Background="White" ad:ResizingPanel.ResizeHeight="120">

<DockPanel><TextBox /></DockPanel>



<ad:DockablePane Background="White" ad:ResizingPanel.ResizeHeight="0.25*">

<ad:DockableContent x:Name="propertiesPane" Title="{Binding PropertiesViewModel.Header}" DockableStyle="DockableToBorders" IsCloseable="False" Background="White" ad:ResizingPanel.ResizeHeight="120">



<DockPanel><TextBox /></DockPanel>






<ad:DockablePane ad:ResizingPanel.ResizeWidth="0.75*" Background="White">

<ad:DockableContent x:Name="centerPane" DockableStyle="DockableToBorders" Title="{Binding CurrentCenterViewModel.Name}" IsCloseable="False" Background="White" ad:ResizingPanel.ResizeHeight="120">

<DockPanel><TextBox /></DockPanel>







Dec 9, 2011 at 7:11 AM

Having a look at this page you see ContentControl is intended to be the base class of classes having a content.

So, however it is not abstract, you should not use it, except if you are building your specialized class.

An example : DockableContent extends ManagedContent, and Managedcontent extends ... ContentControl.

WPF may be touchy and really, the thinnest code is the best.


The Sofa team, SofaWPF library and AvalonDock Commercial support