How to Resize RadTabControl Scroll Button Width

Environment

Product Version 2019.2.510
Product RadTabControl for WPF

Description

How to change the width of the scroll buttons that are shown when the OverflowMode property of RadTabControl set to Scroll.

Solution

Get the RepeatButton controls representing the scroll buttons. Then set their Width. To do this, subscribe to the Loaded event of RadTabControl and use the ChildrenOfType() method to get the buttons.

private void RadTabControl_Loaded(object sender, RoutedEventArgs e) 
{ 
    var tabControl = (RadTabControl)sender; 
    var scrollButtons = tabControl.ChildrenOfType<RepeatButton>(); 
    var leftButton = scrollButtons.FirstOrDefault(x => x.Name == "LeftScrollButtonElement"); 
    var rightButton = scrollButtons.FirstOrDefault(x => x.Name == "RightScrollButtonElement"); 
 
    leftButton.Width = 30; 
    rightButton.Width = 30; 
} 
In this article
Not finding the help you need? Improve this article