using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

using C1.Silverlight;
using C1.Silverlight.Theming;
using C1.Silverlight.Theming.BureauBlack;
using C1.Silverlight.Theming.ExpressionDark;
using C1.Silverlight.Theming.ExpressionLight;
using C1.Silverlight.Theming.RainierOrange;
using C1.Silverlight.Theming.WhistlerBlue;
using C1.Silverlight.Theming.ShinyBlue;

namespace ChartSamples
{
  public partial class Themes : UserControl
  {
    Dictionary<string, object> _dict = new Dictionary<string,object>();

    public Themes()
    {
      _dict["BureauBlack"] = new C1ThemeBureauBlack()
      {

        Content = new ChartGrid() { Background = (Brush)Resources["bgBureauBlack"] }
      };

      _dict["ExpressionDark"] = new C1ThemeExpressionDark()
      {
        Content = new ChartGrid() { Background = (Brush)Resources["bgExpressionDark"] }
      };

      _dict["ExpressionLight"] = new C1ThemeExpressionLight()
      {
        Content = new ChartGrid() { Background = (Brush)Resources["bgExpressionLight"] }
      };

      _dict["RainierOrange"] = new C1ThemeRainierOrange()
      {
        Content = new ChartGrid() { Background = (Brush)Resources["bgRainierOrange"] }
      };

      _dict["ShinyBlue"] = new C1ThemeShinyBlue()
      {
        Content = new ChartGrid() { Background = (Brush)Resources["bgShinyBlue"] }
      };

      _dict["WhistlerBlue"] = new C1ThemeWhistlerBlue()
      {
          Content = new ChartGrid() { Background = new SolidColorBrush(Colors.White) }
      };

      InitializeComponent();

      foreach (C1TabItem ti in tc.Items)
    {
        string key = ti.Header as string;
        if( _dict.ContainsKey(key))
          ti.Content = _dict[key]; 
      }
    }
  }
}
