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

Hide button near RadTabItem

5 Answers 174 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Sergiy
Top achievements
Rank 1
Sergiy asked on 14 Sep 2012, 12:16 PM
Hi, How could I hide the button near RadTabItem on RadTabControl? See atache please.
Thanks

5 Answers, 1 is accepted

Sort by
0
Accepted
Tina Stancheva
Telerik team
answered on 17 Sep 2012, 07:49 AM
Hi Sergiy,

The button you marked is actually a scrolling button that allows you to scroll through the tabs of the RadTabControl. It usually comes up when there are too many tabs in the control and they can't be properly displayed on the screen. If you want to disable this functionality you can set the ScrollViewer.HorizontalScrollBarVisibility attached property value to Disabled.

However, please have in mind that when you disable the ScrollViewer, when there isn't enough space to display all tabs, the control will arrange them in rows. And by default the rows are dynamically reordered to make the row of the currently selected tab first. And you can turn on/of this behavior through the ReorderTabRows property.

Regards,
Tina Stancheva
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

0
Sergiy
Top achievements
Rank 1
answered on 18 Sep 2012, 10:33 AM
Thanks.It helped me
The number of tabs is static. I need to autoWidth their inside TabControl (they all must have the some width).
I wrote for WindowsTabControl some Converter and use it for RadTabControl. (TabItem width = Actual TabControl width  
\ TabControl Width). 
public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
    var tabControl = values[0] as RadTabControl;
 
    if (null != tabControl)
    {
        var width = tabControl.ActualWidth / tabControl.Items.Count;
        //Subtract 2, otherwise we could overflow to two rows.
        return (width <= 1) ? 0 : (width - 2);
    }
    return null;
}
But solution is complicated. See atache file (it's result of my code).

Quastion. Is there an easier way in RadControlTab? Have RadTabControl  got some properties?
0
Tina Stancheva
Telerik team
answered on 20 Sep 2012, 01:36 PM
Hi Sergiy,

You can use instead the Align property of the RadTabControl - if you set its value to Justify, the tabs will automatically align to take up all available area per your requirements.

Greetings,
Tina Stancheva
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

0
Sergiy
Top achievements
Rank 1
answered on 21 Sep 2012, 01:06 PM
Thanks, its works but not correct for me.
I need that all tab have the some width, but in this case tabs take up all available area and they have got diffenent width  
(becase have different text header)

0
Tina Stancheva
Telerik team
answered on 25 Sep 2012, 02:50 PM
Hello Sergiy,

Thank you for getting back to us and elaborating on your scenario. In that case, your approach (manually calculating the width) is the best option.

Greetings,
Tina Stancheva
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

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