RadSelectionChangedEventArgs of TabControl

3 posts, 1 answers
  1. prog1
    prog1 avatar
    61 posts
    Member since:
    Jul 2008

    Posted 10 Aug 2010 Link to this post

    If I register for RadSelectionChangedEvent of the TabControl in code behind it looks like this:

    this

     

     

    .Tab.SelectionChanged += new RoutedEventHandler(Tab_SelectionChanged);

     

     

     

    void Tab_SelectionChanged(object sender, RoutedEventArgs e)

     

    {

     

     

        throw new NotImplementedException();

     

    }

    If I use the XAML IDE of VisualStudio2010 the registered code looks like this and I have to make a cast:

     

     

     

     

     

     

     

    <telerik:RadTabControl SelectionChanged="RadTabControl_SelectionChanged" Name="Tab"/>

     

     

     

     

    private

     

     

    void RadTabControl_SelectionChanged(object sender, RoutedEventArgs e)

     

    {

    Telerik.Windows.Controls.

     

    RadSelectionChangedEventArgs telerikE = e as Telerik.Windows.Controls.RadSelectionChangedEventArgs;

     

    }

    Is there a way to avoid that cast an only register via XAML?
    Changing RoutedEventArgs to RadSelectionChangedEventArgs breaks InitializeComponents().

  2. Answer
    Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 10 Aug 2010 Link to this post

    Hi prog1,

    Unfortunately I cannot think of a way to register a handler with the RadSelectionChangedEventArgs signature from xaml, the cast is needed in this case.

    All the best,
    Miroslav
    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
  4. prog1
    prog1 avatar
    61 posts
    Member since:
    Jul 2008

    Posted 10 Aug 2010 Link to this post

    Hi Miroslav,

    thank you for the quick reply.
    No problem, just wanted to know.
Back to Top