| Task-Based Help > Applying Themes |
The overall appearance of FlexPivot controls can also be customized by applying themes through C1ThemeController. Developers can choose from a collection of predefined built-in themes to customize the control's overall appearance.
To apply built-in themes, perform the following steps.
). The C1FlexPivotPageTasks smart panel appears as illustrated in the image below.

The Design View appears similar to the following image:
Imports C1.Win.C1Themes Imports System.Data.OleDb
using C1.Win.C1Themes; using System.Data.OleDb;
Private Shared Function GetConnectionString() As String Dim path As String = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "\ComponentOne Samples\Common" Dim conn As String = "provider=microsoft.jet.oledb.4.0;data source={0}\c1nwind.mdb;" Return String.Format(conn, path) End Function
// get standard nwind mdb connection string static string GetConnectionString() { string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + @"\ComponentOne Samples\Common"; string conn = @"provider=microsoft.jet.oledb.4.0;data source={0}\c1nwind.mdb;"; return string.Format(conn, path); }
' get data Dim da = New OleDbDataAdapter("Select * from Invoices", GetConnectionString()) Dim dt = New DataTable("NorthWind Sales Data") da.Fill(dt) ' assign data to C1FlexPivotPage control C1FlexPivotPage1.DataSource = dt Dim fp = C1FlexPivotPage1.FlexPivotEngine fp.ValueFields.MaxItems = 3 fp.BeginUpdate() fp.RowFields.Add("Country") fp.ColumnFields.Add("Product") fp.ValueFields.Add("Sales") fp.EndUpdate()
// get data var da = new OleDbDataAdapter("Select * from Invoices", GetConnectionString()); var dt = new DataTable("NorthWind Sales Data"); da.Fill(dt); // assign data to C1FlexPivotPage control c1FlexPivotPage1.DataSource = dt; var fp = c1FlexPivotPage1.FlexPivotEngine; fp.ValueFields.MaxItems = 3; fp.BeginUpdate(); fp.RowFields.Add("Country"); fp.ColumnFields.Add("Product"); fp.ValueFields.Add("Sales"); fp.EndUpdate();
For Each theme As String In C1ThemeController.GetThemes() cbTheme.Items.Add(theme) Next AddHandler cbTheme.SelectedIndexChanged, AddressOf cbTheme_SelectedIndexChanged
cbTheme.SelectedIndexChanged += cbTheme_SelectedIndexChanged; foreach (string theme in C1ThemeController.GetThemes()) cbTheme.Items.Add(theme);
Private Sub cbTheme_SelectedIndexChanged(sender As Object, e As EventArgs) Dim theme As C1Theme = C1ThemeController.GetThemeByName(cbTheme.Text, False) If theme IsNot Nothing Then C1ThemeController.ApplyThemeToObject(c1FlexPivotPage1, theme) End If End Sub
private void cbTheme_SelectedIndexChanged(object sender, EventArgs e) { C1Theme theme = C1ThemeController.GetThemeByName(cbTheme.Text, false); if (theme != null) C1ThemeController.ApplyThemeToObject(c1FlexPivotPage1, theme); }

The theme applies to the forms as illustrated in the following image.
