RadOutlookBar and RadOutlookBarItem SelectionChanged call hierarchy

2 posts, 0 answers
  1. Daniel
    Daniel avatar
    3 posts
    Member since:
    May 2011

    Posted 02 May 2011 Link to this post

    Hello Telerik Team,

    I have a RadOutlookBar, in which is currently one view that inherits from RadOutlookBarItem. In that view I overrided the OnIsSelectedChanged-Method from RadOutlookBarItem.
    In the view, that contains the RadOutlookBar-Control, I added an eventhandler to the event PreviewSelectionChanged. So when I started the Application with the View, following methods are called:

    1. OnIsSelectedChanged of the RadOutlookBarItem (oldvalue=false, newvalue=true)
    2. The event PreviewSelectionChanged of the RadOutlookBar is fired (and certainly my eventhandler is called)

    And if SelectionChangedEventArgs.Handled is set to true
    3. OnIsSelectedChanged of the RadOutlookBarItem(oldvalue=true, newvalue=false)

    Why is OnIsSelectedChanged called before the PreviewSelectionChanged-Event is fired?

    Further Question:
    If I click on the unselected OutlookBarItem, at first PreviewSelectionChanged from OutlookBar ist fired, if the Handled-Property is set to true, the OnIsSelectedChanged-Method of the Item ist called twice (first time with newValue = false, the second time with newValue = true)

    Why is the OnIsSelectedChanged-Method called twice?
  2. Hristo
    Hristo avatar
    352 posts

    Posted 05 May 2011 Link to this post

    Hi Daniel,

    We made several changes to the TabControl selection logic. However we didn't want to introduce to many breaking changes with the new release. Thus we couldn't change the PreviewSelectionChanged event implementation to be exact as users expect to be. Currently the preview event is fired after the selection properties are synchronized. Thus the TabItem's event related to IsSelected property is raised before the preview event in case the selection is changed via that property. Also when changing the selection with IsSelected property of the item and handling the preview event the IsSelectedChanged is fired twice (once before the preview and once after the preview when the selection is reversed).

    We have already logged item about that feature in our public issue tracking system. You can track its status and vote for it through following link: http://www.telerik.com/support/pits.aspx#/public/silverlight/5811

    Hope this helps.

    Best wishes,
    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 R3 2016 release webinar banner
Back to Top