How to Stretch/Maximise a DocumentPane to Fill Available Area?

Nov 16, 2011 at 10:24 AM

I have added two Document Panes at design time to a DockingManager. The first one is set to be visible and the second is hidden/collapsed (see Visibility="Collapsed" below).

When I launch the application, the second Document Pane is not visible, which is the intended behaviour but unfortunately, the visible document panel does not display stretched to the edges of the main window despite the fact that HorizontalAlignment is set to "Stretched". How would I go about making this clip(or maximise) to the edges of the allowed area?

This is the xaml that I am using:

 <ad:DockingManager x:Name="dockManager" Grid.Row="1">
       
<ad:ResizingPanel Name="resizePanel" Orientation="Horizontal">
           
<ad:DocumentPane Name="visibleDocumentPane" HorizontalAlignment="Stretch" >
               
<ad:DocumentContent Title="A"/>
               
<ad:DocumentContent Title="B"/>                    
           
</ad:DocumentPane>
           
<ad:DocumentPane Name="collapsedDocumentPane" Visibility="Collapsed">
               
<ad:DocumentContent Title="A"/>
               
<ad:DocumentContent Title="B"/>
           
</ad:DocumentPane>
       
</ad:ResizingPanel>
   
</ad:DockingManager>