Activated event raised unnecessarily

4 posts, 0 answers
  1. Patrick
    Patrick avatar
    372 posts
    Member since:
    Aug 2012

    Posted 08 Aug 2013 Link to this post

    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
  2. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 13 Aug 2013 Link to this post

    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 >>
  3. DevCraft banner
  4. Patrick
    Patrick avatar
    372 posts
    Member since:
    Aug 2012

    Posted 13 Aug 2013 Link to this post

    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
  5. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 13 Aug 2013 Link to this post

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