PaneGroup.IsContentPreserved = true blocks content resize events

6 posts, 0 answers
  1. Pieter
    Pieter avatar
    34 posts
    Member since:
    Jan 2011

    Posted 18 Oct 2011 Link to this post

    I have an application that has a vertical splitpanel that has two horizontal splitpanels. In the horizontal splitpanels I have RadDocking controls hat hold a viewer control that can show camera images. When docking or undockung a pane it gets reloaded, and the camera images blanks for a moment because the connection needs to be setup again. It would be nice if there is a solution for this, so if anyone has ideas please respond.

    To solve this I tried setting PaneGroup.IsContentPreserved to true. This caused a nasty side effect: some of my content controls of the RadDocking did not receive resize events anymore, and they got loaded with an ActualSize of 0. So my application came up with some empty RadDocking controls while others were working correctly. After quite some time I discovered that Solution for this is to leave IsContentPreserved to false.
  2. George
    Admin
    George avatar
    1332 posts

    Posted 21 Oct 2011 Link to this post

    Hi Pieter,

    Thank you for contacting us.

    Could you please share with us some code? This could shed some light on the problem. Also, please double check if you handle the RadPane.SizeChangedEvent or not, because it is normal if this event doesn't fire because the pane represents only the small tab.


    All the best,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Pieter
    Pieter avatar
    34 posts
    Member since:
    Jan 2011

    Posted 22 Oct 2011 Link to this post

    Example code of the problem can be found here.
    The resize event is handled inside the controls that are client of the radpane.

    The RadPane.SizeChangedEvent event isn't firing indeed. I think this event should fire if the RadPane changes size, the name suggests exactly that. What other event is sent when the RadPane does change size?
     
    I wanted to make a grid in the pane where the header has 10% of the pane with a given minimum and maximum height. Using a grid you just can declare this in the style. However because the RadPane.SizeChanged event wasn't firing when resizing the header height wasn't updated. I changed all client controls to set the header size of the parent when the control is resizing, not a nice solution but it worked. But now the client control does not get resize events anymore.
  5. George
    Admin
    George avatar
    1332 posts

    Posted 26 Oct 2011 Link to this post

    Hi Pieter,

    I would suggest using the RadPaneGroup.SizeChangedEvent. The RadPane item represents only the small tab item in each RadPaneGroup(for more information please refer to the following link - http://www.telerik.com/help/silverlight/raddocking-visual-structure.html). The content of the selected pane is placed in the RadPaneGroup and that's why I would suggest using the RadPaneGroup.SizeChangedEvent.

    Hope this helps.

    All the best,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Pieter
    Pieter avatar
    34 posts
    Member since:
    Jan 2011

    Posted 26 Oct 2011 Link to this post

    Thans for responding.

    However if I get a RadPaneGroup size changed event how do I know which of the RadPanes have changed, and what the size of the changed pane is?

    Also if I have a RadPaneGroup with a SizeChanged handler and 3 RadPanes in that group all having size changed handlers and I move one of the Panes out of the RadPaneGroup so its floating and I resize that pane I do not get any resize events for the floating pane nor for the RadPaneGroup.

    So I think the RadPane SizeChanged should represent the changing of size of a RadPane and should be fired when a RadPane changes size. Why should it be any different than that?

    And the PaneGroup.IsContentPreserved = true still blocks content resize events, so we can't use that feature. I hope this will be fixed soon.
  7. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 31 Oct 2011 Link to this post

    Hi Pieter,

    Using the IsContentPreserved property of the RadPaneGroup shouldn't fully solve the problem that the content is reloaded, because when dragging a pane out of the Docking control it is moved in a different visual tree, so it must be reloaded not matter you set this property or not. I would suggest you to not use the IsContentPreserved property.

    About the SizeChanged event - the pane is just the button, so its SizeChanged event is fired only when the size of this button is changed. Actually this an event, coming from WPF and we have no control over it. If you need to track changes of the size of the Content of the pane you may hook-up to the SizeChanged event of its Content (Grid or something else). If you are using using the SizeChanged event to split the content into two parts - one for the header and for the rest and make them proportional, you may just use a Grid panel and add two rows - one with height * and the other with height 9* instead of handling this by hand.

    Hope this helps.

    Kind regards,

    Miroslav Nedyalkov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
UI for WPF is Visual Studio 2017 Ready