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

Activated event raised unnecessarily

3 Answers 43 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Patrick asked on 08 Aug 2013, 01:58 PM
Hello,
suppose that I have two panes and the second one is activated. If I click on the header of the second pane and drag it, it receives an Activated event, even if it's already activated.
Patrick

3 Answers, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 13 Aug 2013, 09:06 AM
Hi,

This is an expected behavior when a Pane is made floating. In the RadDocking control when a Pane is made floating it is removed from the visual tree, then it is added to a ToolWindow and then added to the Items of the Docking control. In this process when the Pane is removed another Pane needs to made active and in the case when there are two Panes the other Pane is made active. Shortly after that when the ToolWindow is added to the items of the control the floated Pane is made active again.

I recorded a short video for you showing the described mechanism as it may be easier to understand.

Regards,
Vladi
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
answered on 13 Aug 2013, 09:20 AM
Hi Vladi,
I understand why the Activated event is raised.
In my application the panes contain list of items and the list is automatically updated when the pane is activated. The update makes a request to the web service to get the updates from the list that is in memory.
With this Activated behavior, there are two requests to the web service.

One solution to remove the fake Activated events would be to set a private flag when a pane must be made floating and to not raise the Activated flag in this case. Doing so wil make the Activated event correctly reflecting the pane activation.

Patrick
0
Vladi
Telerik team
answered on 13 Aug 2013, 12:04 PM
Hello,

As mentioned before when a Pane is made floating it is removed from the visual tree and added again.In this process the Docking control cannot set it as active becuase it is not longer part of its content. Unfortunately in the current version of the control it is not possible to customize this behavior to make it call the ActivePaneChanged event only once as the ActivePane is actually changed through the floating process which requires for it to be fired again to make the floated Pane active.

Regards,
Vladi
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
Docking
Asked by
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Vladi
Telerik team
Patrick
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or