Resizing window dividing between panes

May 20, 2009 at 11:14 PM
Hi,
I have following code (simple, really, 1 pane left, 1 pane right, 1 pane in the bottom and document pane in the middle):
<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

<ad:DockingManager x:Name="dockingManager" >

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

<ad:ResizingPanel>

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

<ad:DockablePane Name="leftPane">

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

<ad:DockableContent Title="Navigator" Name="Navigator" >

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

<TextBox>N</TextBox>

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

</ad:DockableContent>

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

</ad:DockablePane>

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

<ad:DocumentPaneResizingPanel Orientation="Vertical">

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

<ad:DocumentPane Name="DiagramsPane">

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

<ad:DocumentContent Title="Diagram1" IsFloatingAllowed="False" IsLocked="False">

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

<TextBox>D</TextBox>

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

</ad:DocumentContent>

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

<ad:DocumentContent Title="Diagram2" IsFloatingAllowed="False" >

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

<TextBox>D</TextBox>

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

</ad:DocumentContent>

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

</ad:DocumentPane>

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

<ad:DockablePane >

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

<ad:DockableContent Title="Project" >

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

<TextBox>P</TextBox>

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

</ad:DockableContent>

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

</ad:DockablePane>

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

</ad:DocumentPaneResizingPanel>

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

<ad:DockablePane>

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

<ad:DockableContent Title="Properties" >

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

<TextBox>P</TextBox>

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

</ad:DockableContent>

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

</ad:DockablePane>

 

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

</ad:ResizingPanel>

<font size="2" color="#a31515"><font size="2" color="#a31515">

 

</font></font>
<font size="2" color="#a31515">

 

</font>

</ad:DockingManager>

And when I resize the window, I would like only the document pane to resize; however, the added width is divided among the left right and central pane.

Is it possible to somehow supress this behavior?

May 20, 2009 at 11:16 PM
Edited May 20, 2009 at 11:17 PM

sorry, here is the code again:

<ad:DockingManager>
  <ad:DocumentPaneResizingPanel Orientation="Vertical">
    <ad:DocumentPaneResizingPanel>
      <ad:DocumentPane>
        <ad:DocumentContent x:Name="doc1" Title="Doc1" />
      </ad:DocumentPane>
      <ad:DocumentPane>
        <ad:DocumentContent x:Name="doc2" Title="Doc2" />
      </ad:DocumentPane>
    </ad:DocumentPaneResizingPanel>
    <ad:DocumentPaneResizingPanel ad:ResizingPanel.ResizeHeight="200">
      <ad:DocumentPane>
        <ad:DocumentContent x:Name="doc3" Title="Doc3" />
      </ad:DocumentPane>
      <ad:DocumentPane >
        <ad:DocumentContent x:Name="doc4" Title="Doc4" />
      </ad:DocumentPane>
    </ad:DocumentPaneResizingPanel>
  </ad:DocumentPaneResizingPanel>
</ad:DockingManager>

May 24, 2009 at 4:20 PM
Edited May 24, 2009 at 4:22 PM

I have found the solution for this problem, so if anyone else is wondering how to achieve the described behavior - the solution rests in ResizingPanel.ResizeWidth (resp. Resize Height) dependency property which accepts star notation similar to Grid.Width, so this is the code (notice the star in the DocumentPane and DocumentPaneResizingPanel):

<ContentControl x:Name="TestContainer">
    <ad:DockingManager x:Name="dockingManager" >
        <ad:ResizingPanel>

            <ad:DockablePane Name="leftPane" ad:ResizingPanel.ResizeWidth="200" >
                <ad:DockableContent Title="Navigator" Name="Navigator" >
                    <TextBox>N</TextBox>
                </ad:DockableContent>
            </ad:DockablePane>

            <ad:DocumentPaneResizingPanel Orientation="Vertical" ad:ResizingPanel.ResizeWidth="*">
                <ad:DocumentPane Name="DiagramsPane" ad:DocumentPaneResizingPanel.ResizeHeight="*">
                    <ad:DocumentContent Title="Diagram1" IsFloatingAllowed="False" IsLocked="False">
                        <TextBox>D</TextBox>
                    </ad:DocumentContent>
                    <ad:DocumentContent Title="Diagram2" IsFloatingAllowed="False" >
                        <TextBox>D</TextBox>
                    </ad:DocumentContent>
                </ad:DocumentPane>
                <ad:DockablePane ad:DocumentPaneResizingPanel.ResizeHeight="100">
                    <ad:DockableContent Title="Project" >
                        <TextBox>P</TextBox>
                    </ad:DockableContent>
                </ad:DockablePane>
            </ad:DocumentPaneResizingPanel>

            <ad:DockablePane Name="rightPane" ad:ResizingPanel.ResizeWidth="200">
                <ad:DockableContent Title="Properties" >
                    <TextBox>P</TextBox>
                </ad:DockableContent>
            </ad:DockablePane>

        </ad:ResizingPanel>
    </ad:DockingManager>
</ContentControl>