Show/Hide Content

Jul 12, 2010 at 2:50 PM

Hello,

My issue is with showing and hiding content programatically. I have 2 DockableContent items within a DockablePane. I want to be able to hide and show these items through a button. I can hide them fine, but when I show them, they are no longer grouped together within the same pane, and I cannot figure out how to keep them grouped together.

Thanks for any help!

CODE:

 

public bool ShowSidebar {
  get { return mParent.dcTree.IsVisible; }
  set {
    if ( value ) {
      mParent.dockManager.Show(dcTree,
         DockableContentState.Docked, AnchorStyle.Left);
      mParent.dockManager.Show(mParent.dcFileMgr,
         DockableContentState.Docked, AnchorStyle.Left);
    }
    else {
      mParent.dockManager.Hide(mParent.dcTree);
      mParent.dockManager.Hide(mParent.dcFileMgr);
    }
  }
}

XAML:

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

 

</font><ad:DockingManager x:Name="dockManager" DocumentsSource="{Binding Pages}">
  <ad:ResizingPanel Orientation="Horizontal" Name="pnlTop">
     <!-- sidebar panel -->
     <ad:DockablePane Name="dpSidebar" ShowHeader="True" ad:ResizingPanel.ResizeWidth="175">
        <ad:DockableContent Name="dcFileMgr" Title="File Manager">
           <ContentControl Name="ccFileMgr" />
        </ad:DockableContent>
        <ad:DockableContent Name="dcTree" Title="Navigation">
           <ContentControl Name="ccNavigation" />
        </ad:DockableContent>
     </ad:DockablePane>
     <!-- center tab/pages group -->
      <ad:DocumentPane x:Name="docPaneCenter"/>
  </
ad:ResizingPanel>
</ad:DockingManager>

Jul 12, 2010 at 5:08 PM

This issue should be fixed in ver. 1.3,

Ado