Theme not working on inherited TabStrip

3 posts, 0 answers
  1. Troy
    Troy avatar
    11 posts
    Member since:
    Apr 2009

    Posted 27 May 2010 Link to this post

    If I inherit From RadTabStrip the tabs do not follow the theme.

    They appear as a box.


    using System; 
    using System.Collections.Generic; 
    using System.ComponentModel; 
    using System.Data; 
    using System.Drawing; 
    using System.Linq; 
    using System.Text; 
    using System.Windows.Forms; 
    using Telerik.WinControls.UI; 
    using Telerik.WinControls; 
     
    namespace TabSample 
        
            public class UITabControl : RadTabStrip 
            { 
               
                private List<UITab> _tabs = null
     
                public UITabControl() 
                    : base() 
                { 
                    Dock = DockStyle.Fill; 
                    EnableTabControlMode = true
                    AutoSize = true
                    _tabs = new List<UITab>(); 
                } 
     
                public void CreateTabs() 
                { 
                    for (int i = 1; i < 5; i++) 
                    { 
                        TabItem tab = new TabItem(); 
                        tab.Text = i.ToString(); 
                        RadButton b = new RadButton(); 
                        b.Text = i.ToString(); 
                        b.Click += new EventHandler(b_Click); 
                        tab.ContentPanel.Controls.Add(b);    
                        this.Items.Add(tab); 
                    } 
                } 
     
                void b_Click(object sender, EventArgs e) 
                { 
                    RadButton b = (RadButton)sender; 
                    if (b.Text == "1"
                        ThemeResolutionService.ApplicationThemeName = "Aqua"
                    if (b.Text == "2"
                        ThemeResolutionService.ApplicationThemeName = "Desert"
                    if (b.Text == "3"
                        ThemeResolutionService.ApplicationThemeName = "Breeze"
     
                } 
           
            } 
         

  2. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 27 May 2010 Link to this post

    Hi Troy,

    Please refer to the following knowledge base article:
    http://www.telerik.com/support/kb/winforms/themes/inherit-themes-from-radcontrols.aspx

    Greetings,
    Nikolay
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Troy
    Troy avatar
    11 posts
    Member since:
    Apr 2009

    Posted 27 May 2010 Link to this post

    Thanks!
Back to Top