This is a migrated thread and some comments may be shown as answers.

Changing the RadPane height

5 Answers 221 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Joe Biggert
Top achievements
Rank 1
Joe Biggert asked on 07 Feb 2012, 10:04 PM
I've got a RadSplitContainer that contains three RadPaneGroup each with one RadPane. On a certain event, I want to "shrink" one of the RadPanes. Changing the RadPage height or maxheight didn't seen to make a difference but changing the parent RadPaneGroup does. 

So in my code right now, on one click event when I want my RadPane to shrink, I change the RadPaneGroup's MaxHeight to 50. When I want it to expand again, I change the RadPaneGroup's MaxHeight back to PositiveInifinity. This works well but as soon as I change the height of the RadPaneGroup itself by grabbing the little separator between each RadPaneGroup with my mouse and dragging it; when my collapse event fires, the RadPaneGroup gets shrunk too much or not enough depending on whether I changed the height to be bigger or smaller than before.

It appears the value I set the MaxHeight to needs to change dynamically depending on the current ActualHeight of the RadPaneGroup but I can't seem to find at what factor this needs to change by or, more baffling, why it appears to be opposite depending on the way I changed the height of the RadPaneGroup (for example, if I make it bigger, I have to use a smaller number for the MaxHeight).

So first off, am I doing this wrong by playing with the MaxHeight? If not, how can I get this control whether it be the parent RadSplitContainer or the individual RadPaneGroups to change their height from/to a specific value and from/to infinity (fill)?

EDIT: I've also found that when I "shrink" the middle RadPaneGroup, it doesn't work the first time... then I expand it and shrink it again and, while it works, there is a large gap between it and the top RadPaneGroup.

5 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 15 Feb 2012, 04:33 PM
Hello Joe,

Could you please try to separate the PaneGroup in different SplitContainer, one for each group. Then, manipulate the MaxHeight of the SplitContainers instead of the PaneGroups. Or you could set the following attached property: telerik:ProportionalStackPanel.RelativeSize.
Initially, the Docking control supports relative sizing, so you have to keep in mind that the SplitContainers will try to honor this.

Hope this information helps.

Greetings,
Konstantina
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Joe Biggert
Top achievements
Rank 1
answered on 15 Feb 2012, 05:06 PM
I've separated them out with tried manipulating the SplitContainer itself and still had essentially the same issue. As for setting the telerik:ProportionalStackPanel.RelativeSize property, I do have this set in XAML so it runs on load but I was unaware that I could change this in an event in the code-behind. Is this possible?
0
Accepted
Konstantina
Telerik team
answered on 20 Feb 2012, 02:12 PM
Hi Joe,

The RelativeSize is designed to run at load, you are correct. The sizing of the Panes and PaneGroups is a bit limited in the current version of the Docking control, especially the dynamic setting of these properties. So, I suppose this is the best that can be achieved at the moment.
Sorry for the caused inconvenience.

All the best,
Konstantina
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Joe Biggert
Top achievements
Rank 1
answered on 21 Feb 2012, 04:44 PM
Can this functionality be added to the PITS system as a feature request?
0
Konstantina
Telerik team
answered on 22 Feb 2012, 01:12 PM
Hello,

This is already logged. You can view it here. You can vote for it and track its status.

Regards,
Konstantina
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Tags
Docking
Asked by
Joe Biggert
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Joe Biggert
Top achievements
Rank 1
Share this question
or