ScrollMode=Item not scrolling only a single item

3 posts, 0 answers
  1. Paydon
    Paydon avatar
    3 posts
    Member since:
    Mar 2017

    Posted 28 Jun Link to this post

    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. Paydon
    Paydon avatar
    3 posts
    Member since:
    Mar 2017

    Posted 30 Jun Link to this post

    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?
  3. Dinko
    Admin
    Dinko avatar
    418 posts

    Posted 03 Jul Link to this post

    Hello Paydon,

    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.
Back to Top