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

Load event fired each time I switch on a RadDocumentPane

7 Answers 112 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Michele
Top achievements
Rank 2
Michele asked on 11 Nov 2010, 03:32 PM
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

7 Answers, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 15 Nov 2010, 12:37 PM
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
0
Nick
Top achievements
Rank 1
answered on 19 Mar 2012, 08:50 AM
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?
0
Konstantina
Telerik team
answered on 21 Mar 2012, 06:11 PM
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 >>
0
Nick
Top achievements
Rank 1
answered on 22 Mar 2012, 03:46 AM
Hi,

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

Nick
0
Konstantina
Telerik team
answered on 26 Mar 2012, 02:45 PM
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 >>
0
Nick
Top achievements
Rank 1
answered on 27 Mar 2012, 03:15 AM
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
0
Konstantina
Telerik team
answered on 29 Mar 2012, 09:40 AM
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 >>
Tags
Docking
Asked by
Michele
Top achievements
Rank 2
Answers by
Konstantina
Telerik team
Nick
Top achievements
Rank 1
Share this question
or