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

ScrollMode=Item not scrolling only a single item

2 Answers 64 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Paydon
Top achievements
Rank 1
Paydon asked on 28 Jun 2017, 10:59 PM
Bug: RadTabControl does not scroll only a single item but the entire collection when ScrollMode="Item" and TabStripPlacement="Left". Is there a known workaround for this?

2 Answers, 1 is accepted

Sort by
0
Paydon
Top achievements
Rank 1
answered on 30 Jun 2017, 04:22 PM
As a potential workaround I'm trying to set the scrollMode to pixel and to override the scroll button methods. In the documentation I've noticed OnLeftScrollButtonClick and OnRightScrollButtonClick methods are obsolete. Are there new methods to replace these? Is modifying the scroll button presses no longer supported?
0
Accepted
Dinko | Tech Support Engineer
Telerik team
answered on 03 Jul 2017, 10:39 AM
Hello ,

Thank you for contacting us.

You have hit a known issue when the ScrollMode property is set to Item and TabStripPlacement property is set to Left.  There is log feedback item in our Feedback Portal where you can track its progress.

Indeed these methods are obsolete. An approach which could try is to subscribe to the loaded event of the RadTabControl.  Find the scroll buttons in the visual tree and subscribe to their click event. 
private void TabControl_Loaded(object sender, RoutedEventArgs e)
{
    var tabControl = sender as RadTabControl;
    var leftScrollButton = tabControl.ChildrenOfType<RepeatButton>().FirstOrDefault(x => x.Name == "LeftScrollButtonElement");
    var rightScrollButton = tabControl.ChildrenOfType<RepeatButton>().FirstOrDefault(x => x.Name == "RightScrollButtonElement");
    if (leftScrollButton != null && rightScrollButton != null)
    {
        leftScrollButton.Click += LeftScrollButton_Click;
        rightScrollButton.Click += RightScrollButton_Click;
    }
}     
 
private void RightScrollButton_Click(object sender, RoutedEventArgs e)
{
     
}
 
private void LeftScrollButton_Click(object sender, RoutedEventArgs e)
{
     
}

Regards,
Dinko
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
TabControl
Asked by
Paydon
Top achievements
Rank 1
Answers by
Paydon
Top achievements
Rank 1
Dinko | Tech Support Engineer
Telerik team
Share this question
or