Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
85
Set the split panes width and height correctly.
posted

I am using the following xaml for laying out my application's UI using XamDockManager.

 

 <Grid x:Name="mainGrid" >
            <DockPanel>
               
                <!--The docking manager and the controls contained within-->
                <dock:XamDockManager x:Name="dockingManager" Theme="Office2k7Black" Margin="0" DockPanel.Dock="Bottom">

                    <dock:XamDockManager.Panes>

                 //first split pane
                  <dock:SplitPane dock:XamDockManager.InitialLocation="DockedTop">
                           
                            <dock:ContentPane>
                                //some control contained within
                            </dock:ContentPane>

                            <dock:ContentPane>
                                //some control contained within
                            </dock:ContentPane>

                   </dock:SplitPane>
                   

                   //second split pane -
                    <dock:SplitPane dock:XamDockManager.InitialLocation="DockedBottom">
                            <dock:TabGroupPane dock:SplitPane.RelativeSize="100,200">

                                <dock:ContentPane>
                                    //some control contained within
                                </dock:ContentPane>

                                <dock:ContentPane>
                                   //some control contained within
                                </dock:ContentPane>

                            </dock:TabGroupPane>

                        </dock:SplitPane>


                    </dock:XamDockManager.Panes>
                </dock:XamDockManager>

            </DockPanel>
        </Grid>

Using the above code and the xamDockManager the two splitpanes contained within the XamDockManager.Panes collection do not fill the screen appropriately. The split panes are having their own width and height. There is also certain gap between the two split panes. 

How can I adjust the split panes' width and height to be based on the screen's dimensions and also there should not be any gap between the two split panes.Also how can the first split pane occupy most of the UI while the second one docks to the bottom.

 

 

 

Parents
  • 54937
    Offline posted

    The XamDockManager is a ContentControl. The Content determines what fills the available area. SplitPane instances that are docked are simply docked to one edge of the control and their extent (Width for those docked left|right and Height for those docked top/bottom) determines how big the split pane is but they will never fill the control. The content for the XamDockManager can be any element that you want to be the fill content. If you use a DocumentContentHost as the Content then you can provide VS style tabbed document functionality and the panes within can be docked/undocked.

Reply Children