This question is locked. New answers and comments are not allowed.
If I inherit From RadTabStrip the tabs do not follow the theme.
They appear as a box.
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"; |
} |
} |
} |