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
1865
ContentPane - How to get Height correct?
posted

I Have the following XAML.., and I want that the height of each the 3 ContentPane to be adjusted based on the height of the controls within them. All the three controls have a simple grid with a StackPanel and labels stacked vertically in it. No Height is explicitly stated within these controls (labels, grids or stackpanels). Right now, there is extra space in the 1st ContentPane but some labels in the 3rd pane are getting cut.

<my:XamDockManager Grid.Row="1" Grid.Column="0">

<my:XamDockManager.Panes>

<my:SplitPane SplitterOrientation="Horizontal" VerticalAlignment="Top" MinHeight="560" Height="600">

<my:ContentPane Name="cpSummaryA" Header="Summary A" IsHitTestVisible="False" CloseButtonVisibility="Collapsed" PinButtonVisibility="Hidden" WindowPositionMenuVisibility="Hidden" >

<local:UCSummaryA x:Name="ucSummaryA" >local:UCSummaryA>

my:ContentPane>

<my:ContentPane Name="cpSummaryB" IsHitTestVisible="False" Header="Summary B" HorizontalAlignment="Left" CloseButtonVisibility="Collapsed" PinButtonVisibility="Hidden" WindowPositionMenuVisibility="Hidden">

<local:UCSummaryB x:Name="ucSummaryB" >local:UCSummaryB>

my:ContentPane>

<my:ContentPane Name="cpSummaryC" Header="Summary B" IsHitTestVisible="False" HorizontalAlignment="Left" CloseButtonVisibility="Collapsed" PinButtonVisibility="Hidden" WindowPositionMenuVisibility="Hidden">

<local:UCSummaryC x:Name="ucSummaryC" >local:UCSummaryC>

my:ContentPane>

my:SplitPane>

my:XamDockManager.Panes>

<my:DocumentContentHost>......my:DocumentContentHost>

Parents
  • 54937
    Offline posted

    The xamDockManager doesn't size the panes based on the size of the content except with regards to the extent opposite to the docked edge. E.g. if you have a root (i.e. directly in the Panes collection of the xamDockMaanger) SplitPane docked to the Left/Right and its Width is not set (i.e. left set to NaN) then it's width is based on the width of the desired size of the children after measuring them with the available size. However, the height of the pane docked to Left/Right is based on the remaining space similar to what a DockPanel would do and therefore it's extent in that orientation cannot be based on the children. To determine the size of the children in that orientation the SplitPane uses the attached RelativeSize property. There is currently no mode where panes are distributed based on their desired size in that orientation.

Reply Children