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
40
Is it possible to set the XamDockManager Content pane to a fixed size?
posted

Hello.

I am using the XamDockManager for my UI along with a SplitPane so that I can have movable/docking/floating content panes. I understand that the size of the Dock Manager content area is determined by the size of the SplitPane hosted in XamDockManager.Panes. If possible I want the Content area to be a permanently fixed size but I am not sure if this is achievable. I am setting the Height, MinHeight and MaxHeight of the SplitPane on load and this does give me control over the size of the Content area. BUT, when the UI initially loads the size of the Content area is set to a relative size and my Height, MinHeight and MaxHeight setting do not take effect until I resize the SplitPane manually using the splitter. As soon as I do that the Height, MinHeight and MaxHeight setting take effect and the Content area snaps to the desired size.

Does anyone know how to get the XamDockManager to load and display using my preferred size from the start? Or failing that if there is a way that I can spoof the resizing of the splitter?

Thanks,
Damian

MainPage.xaml

<ig:XamDockManager
x:Name="reconDashboardDockManager">

<ig:XamDockManager.Content>

<ig:DocumentContentHost
x:Name="MyDocumentContentHost"
VerticalAlignment="Top">

<ig:DocumentContentHost.Panes>

<ig:TabGroupPane
x:Name="reconTabPane"
VerticalAlignment="Top">

<ig:ContentPane
x:Name="reconFiltersPane"
Header="Filters">
<views:ReconFiltersView
x:Name="reconFiltersView" />
</ig:ContentPane>

</ig:TabGroupPane>

</ig:DocumentContentHost.Panes>

</ig:DocumentContentHost>

</ig:XamDockManager.Content>

<ig:XamDockManager.Panes>

<ig:SplitPane
x:Name="SplitPane"
Location="Bottom"
Orientation="Vertical">

<ig:ContentPane
x:Name="reconVisualizationPane"
Header="Visualization">
<views:ReconVisualizationView
x:Name="reconVisualizationView" />
</ig:ContentPane>

<ig:ContentPane
x:Name="reconSummaryPane"
Header="Summary">
<views:ReconSummaryView
x:Name="reconSummaryView" />
</ig:ContentPane>

</ig:SplitPane>

</ig:XamDockManager.Panes>

</ig:XamDockManager>

MainPage.xaml.cs

private void AdjustSplitPane()
{
DashboardDockManager.UpdateLayout();
double height = DashboardDockManager.ActualHeight - 75;
SplitPane.Height = height;
SplitPane.MinHeight = height;
SplitPane.MaxHeight = height;
SplitPane.UpdateLayout();
}

private void DashboardDockManager_Loaded(object sender, RoutedEventArgs e)
{
AdjustSplitPane();
}

private void DashboardDockManager_SizeChanged(object sender, SizeChangedEventArgs e)
{
AdjustSplitPane();
}

private void SplitPane_SizeChanged(object sender, SizeChangedEventArgs e)
{
AdjustSplitPane();
}

Parents
No Data
Reply
  • 17475
    Offline posted

    Hello Damian,

    XamDockManager’s panes are designed so that their size is based on the content and the available space. As you have mentioned the SplitPane size is set when the user drags the splitter and the Width and Height are set accordingly. This behavior was implemented to be similar to the functionality in Visual Studio.

    Let me know if you have any questions.

Children
No Data