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

Theme not working on inherited TabStrip

2 Answers 85 Views
Tabstrip (obsolete as of Q2 2010)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Troy
Top achievements
Rank 1
Troy asked on 27 May 2010, 05:13 PM
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 Answers, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 27 May 2010, 05:18 PM
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.
0
Troy
Top achievements
Rank 1
answered on 27 May 2010, 05:46 PM
Thanks!
Tags
Tabstrip (obsolete as of Q2 2010)
Asked by
Troy
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Troy
Top achievements
Rank 1
Share this question
or