Hide button near RadTabItem

6 posts, 1 answers
  1. Sergiy
    Sergiy avatar
    38 posts
    Member since:
    Jan 2012

    Posted 14 Sep 2012 Link to this post

    Hi, How could I hide the button near RadTabItem on RadTabControl? See atache please.
    Thanks
  2. Answer
    Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 17 Sep 2012 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Sergiy
    Sergiy avatar
    38 posts
    Member since:
    Jan 2012

    Posted 18 Sep 2012 Link to this post

    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?
  5. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 20 Sep 2012 Link to this post

    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.

  6. Sergiy
    Sergiy avatar
    38 posts
    Member since:
    Jan 2012

    Posted 21 Sep 2012 Link to this post

    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)

  7. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 25 Sep 2012 Link to this post

    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.

Back to Top
UI for WPF is Visual Studio 2017 Ready