Load event fired each time I switch on a RadDocumentPane

8 posts, 0 answers
  1. Paolo
    Paolo avatar
    423 posts
    Member since:
    Jun 2009

    Posted 11 Nov 2010 Link to this post

    Hello,
    I've noticed that using the raddocking control ,each time I switch from a pane to another one , the usercontrol's Load event is fired... is there a way of avoiding such a behavior? I tought that the pane's below were just rendered and don't need to fire load event again

    Thanks
    Paolo
  2. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 15 Nov 2010 Link to this post

    Hi Paolo,

    Thank you for contacting us.

    All the controls are firing their loaded events when they appear in the visual tree. If there is only one pane in a RadPaneGroup it hides its tab strip area (where the panes are displayed) and the pane never gets shown. On the other hand its content gets added to the visual tree and its loaded event is fired. If you have more than one pane in a pane group, the loaded event only of the selected pane will be fired, because the content of all other panes is actually not visible (a similar thing happens when you use tab control). When the user selects another pane, its content gets added to the visual tree and the content of the previous one is removed from it.

    The content of the pane is not part of its visual tree - it is actually part of the visual tree of the pane group. On the other hand the pane group displays only the selected pane and if there are more than one the others are actually not in the visual tree at all.
    When a Pane is made floating it is taken out of the Visual Tree, new pane group is created and put in the ToolWindow.
    When the state of the Pane is changed it is taken out from this visual tree and put into another one.
    This is how the RadDocking is working.

    Hope this information helps. If you have any other questions please let us know.

    Greetings,
    Konstantina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Nick
    Nick avatar
    8 posts
    Member since:
    Apr 2011

    Posted 19 Mar 2012 Link to this post

    I wonder if there is someway to activate the panes from code such that they appear in the visual tree.

    For example an acceptance test might want to check that the panes have been loaded.

    Because they are not visible it's not possible to check the Panes property of the RadGroup

    Any suggestions then on how to achieve this so I can Assert of the number of panes?
  5. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 21 Mar 2012 Link to this post

    Hi,

    You can activate the panes by using the ActivatePane property of the docking control. Also, the docking control holds a collection of all pane, which is called Panes. You can get the number of the panes from there.

    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. Nick
    Nick avatar
    8 posts
    Member since:
    Apr 2011

    Posted 21 Mar 2012 Link to this post

    Hi,

    This sort of code doesn't work in a Silverlight unit test.  What can I do in a Silverlight unit test?

    Nick
  7. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 26 Mar 2012 Link to this post

    Hi Nick,

    Could you please clarify what exactly is the problem - if you could send us a sample project which illustrates the issue, it will be very helpful for providing you with the suited solution for your case.

    Looking forward to your reply.

    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 >>
  8. Nick
    Nick avatar
    8 posts
    Member since:
    Apr 2011

    Posted 26 Mar 2012 Link to this post

    I created a sample and it works ok.

    This sample doesn't use PRISM.

    In our application we use PRISM and I wrote an Adaptor for PRISM to handle the RadPane.

    Therefore there is something in that infrastructure that means the panes aren't populated until further along in the screen display process.

    So need to work out at what point that is.

    Regards,

    Nick
  9. Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 29 Mar 2012 Link to this post

    Hi Nick,

    You could refer to this forum post where you can find an example of implementing RadDocking with PRISM, if that could help resolve the issue.

    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 >>
Back to Top
DevCraft banner