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

SelectionChanged event listed twice??

1 Answer 71 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Rob Ainscough
Top achievements
Rank 1
Rob Ainscough asked on 28 Oct 2011, 04:28 PM
Why is the SelectionChanged event listed twice?  (VB)  As you can see, only a very slight difference when code is generated "RadSelectionChangedEventArgs" and "SelectionChangedEventArgs".   But either way, shouldn't there only be ONE SelectionChanged event handler, not two?

 

Private Sub SetupTabControl_SelectionChanged(sender As Object, e As Telerik.Windows.Controls.RadSelectionChangedEventArgs) Handles SetupTabControl.SelectionChanged

 

End Sub

 

Private Sub SetupTabControl_SelectionChanged1(sender As Object, e As Telerik.Windows.Controls.SelectionChangedEventArgs) Handles SetupTabControl.SelectionChanged

 

End Sub

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 02 Nov 2011, 04:11 PM
Hi Rob Ainscough,

During the Q1 2011 release we changed the implementation of the RadTabControl in order to fix many bugs and improve its design. One of the changes is that it now inherits from Selector. However, due to backward compatibility issues we couldn't change the old RadTabControl Selection Events arguments type and therefore we had to define a new SelectionChanged event with the same name but different arguments type.

However the VS feature for attaching events with Handled keyword in VisualBasic finds both events. The only difference between these two events is the type of the event arguments. However, RadSelectionChangedEventArgs derives from SelectionChangedEventArgs and those two classes are almost identical. And you can use either one of the two events.

We are researching the topic in order to make the VisualStudio display only the first event.

Best wishes,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
TabControl
Asked by
Rob Ainscough
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or