Group created event

2 posts, 0 answers
  1. Russell Mason
    Russell Mason avatar
    87 posts
    Member since:
    Oct 2006

    Posted 27 May 2010 Link to this post

    Hi

    I need to track when tabs change. I can do this by listening to the SelectionChanged event of a group. However, when the user drags panes out of the existing group and into other groups, groups get created dynamically as they do.

    Is theres an event available so I know I need to start listening to these newly created groups? I can see that PaneStateChange fires but cant seem to find anything useful it is telling me.

    Thanks
    Russell Mason
  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 01 Jun 2010 Link to this post

    Hello Russell,

     You could listen for the RoutedEvent - this way you will get the SelectionCahnged for all of the groups in a one handler. Please refer to the following example:

    public partial class MainPage : UserControl
    {
        static MainPage()
        {
            EventManager.RegisterClassHandler(typeof(RadPaneGroup), RadPaneGroup.SelectionChangedEvent, new RoutedEventHandler(OnPaneGroupSelectionChanged));
        }
     
        private static void OnPaneGroupSelectionChanged(object sender, RoutedEventArgs e)
        {
            var group = sender as RadPaneGroup;
     
            if (group != null)
            {
                // TODO: Perform your action here.
            }
        }
     
        public MainPage()
        {
            InitializeComponent();
        }
    }

    Kind regards,
    Miroslav Nedyalkov
    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
Back to Top