# Apply Themes

## Content



Sparkline supports built-in ComponentOne themes available in **C1.WPF.Theming library**. You can apply any of the available C1 themes to the Sparkline control and provide a customized and consistent appearance to the application.

![WPF Sparkline with Theme](https://cdn.mescius.io/document-site-files/images/9decca57-66c3-4dca-a1cc-04fdd3fb16b4/images/apply_theme.png)

The following steps illustrate how to apply C1 themes to Sparkline. This example uses the sample created in the [Quick start](/componentone/docs/wpf/online-sparkline/quick_start).

1.  Add the following assembly references to your application.
    
    *   C1.WPF.Theming
    *   C1.WPF.Theming.ShinyBlue
2.  Create a class named MyTheme to return an object of the C1Themes class.
    
    ```csharp
    public class MyThemes
    {
        private static C1Theme _myTheme = null;
        public static C1Theme MyTheme
        {
            get
            {
                if (_myTheme == null)
                {
                    _myTheme = new C1ThemeShinyBlue();
                }
                return _myTheme;
            }
        }
    }
    ```
    
3.  Subscribe to the **Sparkline\_Loaded** event and add the following code to the Sparkline\_Loaded event handler to apply the theme to the Sparkline control.
    
    ```csharp
    //Apply C1 theme to Sparkline 
    C1Theme.ApplyTheme(sparkline, MyThemes.MyTheme);
    ```