or
| Private Sub RadButtonElement1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadButtonElement1.Click |
| AddPage(frmProject, "Project") |
| End Sub |
| Private Sub AddPage(ByVal f As Form, ByVal strPage As String) |
| RadDock1.DockControl(f, DockPosition.Fill, DockType.Document) |
| End Sub |
| 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"; |
| } |
| } |
| } |