Changing the RadPane height

6 posts, 1 answers
  1. Joe Biggert
    Joe Biggert avatar
    17 posts
    Member since:
    Feb 2010

    Posted 07 Feb 2012 Link to this post

    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.
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 15 Feb 2012 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Joe Biggert
    Joe Biggert avatar
    17 posts
    Member since:
    Feb 2010

    Posted 15 Feb 2012 Link to this post

    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?
  5. Answer
    Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 20 Feb 2012 Link to this post

    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 >>
  6. Joe Biggert
    Joe Biggert avatar
    17 posts
    Member since:
    Feb 2010

    Posted 21 Feb 2012 Link to this post

    Can this functionality be added to the PITS system as a feature request?
  7. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 22 Feb 2012 Link to this post

    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 >>
Back to Top
UI for WPF is Visual Studio 2017 Ready