I am trying to find a way to have a relative size set between a DocumentContentHost and a SplitPane.
I have a DockManager that is using the DocumentContentHost as a 'Top Pane' which has multiple documents that are ScrollViewer controls with a WPF Grid control nested within. My 'Bottom Pane' is a Split Pane that contains a TabGroupPane with Content Panes nested with it.
I have added the following code to the 'Bottom Pane' where sp is the split pane holding the TabGroupPane and childPercent is a integer between 0 and 100. This results in the 'Bottom Pane' being just large enough to show it's content (wrapping).
SplitPane.SetRelativeSize(sp, New Size(100, childPercent))
I them added the following code to the 'Top Pane' where Xdm is the DockManager and parentPercent is the different between 100 and the childPercentage. This also fails.
For Each pne In Xdm.Panes SplitPane.SetRelativeSize(pne, New Size(100, parentPercent)) Next
Is there anything that could get this to work? Here is a running example: IMAGE
Thank you.
Hello Devin,
Thank you for your reply. I am very glad that the approach I have suggested was helpful for you. Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
This will work great. And yet again, the level of support from your team amazes me.
Thank you
Devin
Hello,
Thank you for your post. I have been looking into the functionality that you have described and I can suggest using the SizeChanged event of the XamDockManager and in the event handler to set the Height of the bottom SplitPane to value, since the SplitPane.RelativeSize attached property, is used to set proportional size between the ContentPanes in a SplitPane. You can read detail description of the RelativeSize property here: http://help.infragistics.com/NetAdvantage/WPF/2012.1/CLR4.0/?page=InfragisticsWPF4.DockManager.v12.1~Infragistics.Windows.DockManager.SplitPane~RelativeSizeProperty.html. I have also created a sample application for you, that shows how you can implement the approach I have described.
Please let me know if you need any further assistance on the matter.