Hi Chris,
There is no scrolling event exposed, but you can use the
VisualTreeHelper class to find the left and right scroll buttons.
public
MainPage()
{
InitializeComponent();
// populate the TabControl with some items to force the scroll button to appear
this
.tabControl1.ItemsSource = Enumerable.Range(0, 50);
this
.Loaded +=
new
RoutedEventHandler(MainPage_Loaded);
}
void
MainPage_Loaded(
object
sender, RoutedEventArgs e)
{
this
.Dispatcher.BeginInvoke(() =>
{
// Get the first element in RadTabControl's visual tree
var root = VisualTreeHelper.GetChild(
this
.tabControl1, 0)
as
Panel;
// Find the LeftScrollButtonElement and RightScrollButtonElement
RepeatButton leftScrollButtonElement = root.FindName(
"LeftScrollButtonElement"
)
as
RepeatButton;
Debug.Assert(leftScrollButtonElement !=
null
);
RepeatButton rightScrollButtonElement = root.FindName(
"RightScrollButtonElement"
)
as
RepeatButton;
Debug.Assert(rightScrollButtonElement !=
null
);
// Subscribe to their click event
leftScrollButtonElement.Click +=
new
RoutedEventHandler(LeftScrollButtonElement_Click);
rightScrollButtonElement.Click +=
new
RoutedEventHandler(RightScrollButtonElement_Click);
});
}
private
void
RightScrollButtonElement_Click(
object
sender, RoutedEventArgs e)
{
MessageBox.Show(
"RightScrollButton clicked"
);
}
private
void
LeftScrollButtonElement_Click(
object
sender, RoutedEventArgs e)
{
MessageBox.Show(
"LeftScrollButton clicked"
);
}
Give it a try and let me know if this helps.
Sincerely yours,
Kiril Stanoev
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