Simple Style

This Simple Style is the base for customization of your own styles. It was created using Xaxaml tool (http://www.kaxaml.com).

<Page
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
 
  <!-- Define Page Styles for "Simple Style" -->
  <Page.Resources>
 
  <!-- Normal Brush -->
 
  <LinearGradientBrush x:Key="NormalBrush" StartPoint="0,0" EndPoint="0,1">
    <GradientBrush.GradientStops>
      <GradientStopCollection>
        <GradientStop Color="#FFF" Offset="0.0"/>
        <GradientStop Color="#CCC" Offset="1.0"/>
      </GradientStopCollection>
    </GradientBrush.GradientStops>
  </LinearGradientBrush>
 
  <LinearGradientBrush x:Key="NormalBorderBrush" StartPoint="0,0" EndPoint="0,1">
    <GradientBrush.GradientStops>
      <GradientStopCollection>
        <GradientStop Color="#CCC" Offset="0.0"/>
        <GradientStop Color="#444" Offset="1.0"/>
      </GradientStopCollection>
    </GradientBrush.GradientStops>
  </LinearGradientBrush>
 
  <LinearGradientBrush x:Key="HorizontalNormalBrush" StartPoint="0,0" EndPoint="1,0">
    <GradientBrush.GradientStops>
      <GradientStopCollection>
        <GradientStop Color="#FFF" Offset="0.0"/>
        <GradientStop Color="#CCC" Offset="1.0"/>
      </GradientStopCollection>
    </GradientBrush.GradientStops>
  </LinearGradientBrush>
 
  <LinearGradientBrush x:Key="HorizontalNormalBorderBrush" StartPoint="0,0" EndPoint="1,0">
    <GradientBrush.GradientStops>
      <GradientStopCollection>
        <GradientStop Color="#CCC" Offset="0.0"/>
        <GradientStop Color="#444" Offset="1.0"/>
      </GradientStopCollection>
    </GradientBrush.GradientStops>
  </LinearGradientBrush>
 
  <!-- Light Brush -->
 
  <LinearGradientBrush x:Key="LightBrush" StartPoint="0,0" EndPoint="0,1">
    <GradientBrush.GradientStops>
      <GradientStopCollection>
        <GradientStop Color="#FFF" Offset="0.0"/>
        <GradientStop Color="#EEE" Offset="1.0"/>
      </GradientStopCollection>
    </GradientBrush.GradientStops>
  </LinearGradientBrush>
 
  <LinearGradientBrush x:Key="HorizontalLightBrush" StartPoint="0,0" EndPoint="1,0">
    <GradientBrush.GradientStops>
      <GradientStopCollection>
        <GradientStop Color="#FFF" Offset="0.0"/>
        <GradientStop Color="#EEE" Offset="1.0"/>
      </GradientStopCollection>
    </GradientBrush.GradientStops>
  </LinearGradientBrush>
 
  <!-- Dark Brush -->
 
  <LinearGradientBrush x:Key="DarkBrush" StartPoint="0,0" EndPoint="0,1">
    <GradientBrush.GradientStops>
      <GradientStopCollection>
        <GradientStop Color="#FFF" Offset="0.0"/>
        <GradientStop Color="#AAA" Offset="1.0"/>
      </GradientStopCollection>
    </GradientBrush.GradientStops>
  </LinearGradientBrush>
 
  <!-- Pressed Brush -->
 
  <LinearGradientBrush x:Key="PressedBrush" StartPoint="0,0" EndPoint="0,1">
    <GradientBrush.GradientStops>
      <GradientStopCollection>
        <GradientStop Color="#BBB" Offset="0.0"/>
        <GradientStop Color="#EEE" Offset="0.1"/>
        <GradientStop Color="#EEE" Offset="0.9"/>
        <GradientStop Color="#FFF" Offset="1.0"/>
      </GradientStopCollection>
    </GradientBrush.GradientStops>
  </LinearGradientBrush>
 
  <LinearGradientBrush x:Key="PressedBorderBrush" StartPoint="0,0" EndPoint="0,1">
    <GradientBrush.GradientStops>
      <GradientStopCollection>
        <GradientStop Color="#444" Offset="0.0"/>
        <GradientStop Color="#888" Offset="1.0"/>
      </GradientStopCollection>
    </GradientBrush.GradientStops>
  </LinearGradientBrush>
 
  <!-- Defaulted Brush -->
 
  <LinearGradientBrush x:Key="DefaultedBorderBrush" StartPoint="0,0" EndPoint="0,1">
    <GradientBrush.GradientStops>
      <GradientStopCollection>
        <GradientStop Color="#777" Offset="0.0"/>
        <GradientStop Color="#000" Offset="1.0"/>
      </GradientStopCollection>
    </GradientBrush.GradientStops>
  </LinearGradientBrush>
 
  <!-- Disabled Brush -->
 
  <SolidColorBrush x:Key="DisabledForegroundBrush" Color="#888" />
  <SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#EEE" />
  <SolidColorBrush x:Key="DisabledBorderBrush" Color="#AAA" />
 
  <!-- Border Brushes -->
 
  <SolidColorBrush x:Key="SolidBorderBrush" Color="#888" />
  <SolidColorBrush x:Key="LightBorderBrush" Color="#AAA" />
 
  <!-- Miscellaneous Brushes -->
 
  <SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FFF" />
  <SolidColorBrush x:Key="SelectedBackgroundBrush" Color="#DDD" />
  <SolidColorBrush x:Key="GlyphBrush" Color="#444" />
  <SolidColorBrush x:Key="LightColorBrush" Color="#DDD" />
 
  <!-- Focus Visual -->
 
  <Style x:Key="ButtonFocusVisual">
    <Setter Property="Control.Template">
      <Setter.Value>
        <ControlTemplate>
          <Border>
            <Rectangle 
              Margin="2"
              StrokeThickness="1"
              Stroke="#60000000"
              StrokeDashArray="1 2"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <!-- SimpleStyles: Button -->
 
  <Style TargetType="{x:Type Button}">
    <Setter Property="SnapsToDevicePixels" Value="true"/>
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
    <Setter Property="MinHeight" Value="23"/>
    <Setter Property="MinWidth" Value="75"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Button}">
          <Border 
            x:Name="Border"  
            CornerRadius="2" 
            BorderThickness="1"
            Background="{StaticResource NormalBrush}"
            BorderBrush="{StaticResource NormalBorderBrush}">
            <ContentPresenter 
              Margin="2"
              HorizontalAlignment="Center"
              VerticalAlignment="Center"
              RecognizesAccessKey="True"/>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsKeyboardFocused" Value="true">
              <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DefaultedBorderBrush}" />
            </Trigger>
            <Trigger Property="IsDefaulted" Value="true">
              <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DefaultedBorderBrush}" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="true">
              <Setter TargetName="Border" Property="Background" Value="{StaticResource DarkBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="true">
              <Setter TargetName="Border" Property="Background" Value="{StaticResource PressedBrush}" />
              <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource PressedBorderBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
              <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
              <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
              <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <!-- Focus Visual -->
 
  <Style x:Key="CheckBoxFocusVisual">
    <Setter Property="Control.Template">
      <Setter.Value>
        <ControlTemplate>
          <Border>
            <Rectangle 
              Margin="15,0,0,0"
              StrokeThickness="1"
              Stroke="#60000000"
              StrokeDashArray="1 2"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <!-- SimpleStyles: CheckBox -->
 
  <Style x:Key="{x:Type CheckBox}" TargetType="{x:Type CheckBox}">
    <Setter Property="SnapsToDevicePixels" Value="true"/>
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Setter Property="FocusVisualStyle"	Value="{StaticResource CheckBoxFocusVisual}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type CheckBox}">
          <BulletDecorator Background="Transparent">
            <BulletDecorator.Bullet>
              <Border x:Name="Border"  
                Width="13" 
                Height="13" 
                CornerRadius="0" 
                Background="{StaticResource NormalBrush}"
                BorderThickness="1"
                BorderBrush="{StaticResource NormalBorderBrush}">
                <Path 
                  Width="7" Height="7" 
                  x:Name="CheckMark"
                  SnapsToDevicePixels="False" 
                  Stroke="{StaticResource GlyphBrush}"
                  StrokeThickness="2"
                  Data="M 0 0 L 7 7 M 0 7 L 7 0" />
              </Border>
            </BulletDecorator.Bullet>
            <ContentPresenter Margin="4,0,0,0"
              VerticalAlignment="Center"
              HorizontalAlignment="Left"
              RecognizesAccessKey="True"/>
          </BulletDecorator>
          <ControlTemplate.Triggers>
            <Trigger Property="IsChecked" Value="false">
              <Setter TargetName="CheckMark" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="IsChecked" Value="{x:Null}">
              <Setter TargetName="CheckMark" Property="Data" Value="M 0 7 L 7 0" />
            </Trigger>
            <Trigger Property="IsMouseOver" Value="true">
              <Setter TargetName="Border" Property="Background" Value="{StaticResource DarkBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="true">
              <Setter TargetName="Border" Property="Background" Value="{StaticResource PressedBrush}" />
              <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource PressedBorderBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
              <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
              <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
              <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <!-- SimpleStyles: ComboBox -->
 
  <ControlTemplate x:Key="ComboBoxToggleButton" TargetType="{x:Type ToggleButton}">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition />
        <ColumnDefinition Width="20" />
      </Grid.ColumnDefinitions>
      <Border
        x:Name="Border" 
        Grid.ColumnSpan="2"
        CornerRadius="2"
        Background="{StaticResource NormalBrush}"
        BorderBrush="{StaticResource NormalBorderBrush}"
        BorderThickness="1" />
      <Border 
        Grid.Column="0"
        CornerRadius="2,0,0,2" 
        Margin="1" 
        Background="{StaticResource WindowBackgroundBrush}" 
        BorderBrush="{StaticResource NormalBorderBrush}"
        BorderThickness="0,0,1,0" />
      <Path 
        x:Name="Arrow"
        Grid.Column="1"     
        Fill="{StaticResource GlyphBrush}"
        HorizontalAlignment="Center"
        VerticalAlignment="Center"
        Data="M 0 0 L 4 4 L 8 0 Z"/>
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="ToggleButton.IsMouseOver" Value="true">
        <Setter TargetName="Border" Property="Background" Value="{StaticResource DarkBrush}" />
      </Trigger>
      <Trigger Property="ToggleButton.IsChecked" Value="true">
        <Setter TargetName="Border" Property="Background" Value="{StaticResource PressedBrush}" />
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
        <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
        <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
        <Setter TargetName="Arrow" Property="Fill" Value="{StaticResource DisabledForegroundBrush}" />
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
 
  <ControlTemplate x:Key="ComboBoxTextBox" TargetType="{x:Type TextBox}">
    <Border x:Name="PART_ContentHost" Focusable="False" Background="{TemplateBinding Background}" />
  </ControlTemplate>
 
  <Style x:Key="{x:Type ComboBox}" TargetType="{x:Type ComboBox}">
    <Setter Property="SnapsToDevicePixels" Value="true"/>
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
    <Setter Property="MinWidth" Value="120"/>
    <Setter Property="MinHeight" Value="20"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ComboBox}">
          <Grid>
            <ToggleButton 
              Name="ToggleButton" 
              Template="{StaticResource ComboBoxToggleButton}" 
              Grid.Column="2" 
              Focusable="false"
              IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"
              ClickMode="Press">
            </ToggleButton>
            <ContentPresenter
              Name="ContentSite"
              IsHitTestVisible="False" 
              Content="{TemplateBinding SelectionBoxItem}"
              ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
              ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
              Margin="3,3,23,3"
              VerticalAlignment="Center"
              HorizontalAlignment="Left" />
            <TextBox x:Name="PART_EditableTextBox"
              Style="{x:Null}" 
              Template="{StaticResource ComboBoxTextBox}" 
              HorizontalAlignment="Left" 
              VerticalAlignment="Center" 
              Margin="3,3,23,3"
              Focusable="True" 
              Background="Transparent"
              Visibility="Hidden"
              IsReadOnly="{TemplateBinding IsReadOnly}"/>
            <Popup 
              Name="Popup"
              Placement="Bottom"
              IsOpen="{TemplateBinding IsDropDownOpen}"
              AllowsTransparency="True" 
              Focusable="False"
              PopupAnimation="Slide">
              <Grid 
                Name="DropDown"
                SnapsToDevicePixels="True"                
                MinWidth="{TemplateBinding ActualWidth}"
                MaxHeight="{TemplateBinding MaxDropDownHeight}">
                <Border 
                  x:Name="DropDownBorder"
                  Background="{StaticResource WindowBackgroundBrush}"
                  BorderThickness="1"
                  BorderBrush="{StaticResource SolidBorderBrush}"/>
                <ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True">
                  <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
                </ScrollViewer>
              </Grid>
            </Popup>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="HasItems" Value="false">
              <Setter TargetName="DropDownBorder" Property="MinHeight" Value="95"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
              <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
            </Trigger>
            <Trigger Property="IsGrouping" Value="true">
              <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
            </Trigger>
            <Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="true">
              <Setter TargetName="DropDownBorder" Property="CornerRadius" Value="4"/>
              <Setter TargetName="DropDownBorder" Property="Margin" Value="0,2,0,0"/>
            </Trigger>
            <Trigger Property="IsEditable"
                 Value="true">
              <Setter Property="IsTabStop" Value="false"/>
              <Setter TargetName="PART_EditableTextBox" Property="Visibility"	Value="Visible"/>
              <Setter TargetName="ContentSite" Property="Visibility" Value="Hidden"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Triggers>
    </Style.Triggers>
  </Style>
 
  <!-- SimpleStyles: ComboBoxItem -->
 
  <Style x:Key="{x:Type ComboBoxItem}" TargetType="{x:Type ComboBoxItem}">
    <Setter Property="SnapsToDevicePixels" Value="true"/>
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ComboBoxItem}">
          <Border 
            Name="Border"
            Padding="2"
            SnapsToDevicePixels="true">
            <ContentPresenter />
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsHighlighted" Value="true">
              <Setter TargetName="Border" Property="Background" Value="{StaticResource SelectedBackgroundBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
              <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <!-- SimpleStyles: Expander -->
 
  <ControlTemplate x:Key="ExpanderToggleButton" TargetType="{x:Type ToggleButton}">
    <Border
      Name="Border" 
      CornerRadius="2,0,0,0"
      Background="Transparent"
      BorderBrush="{StaticResource NormalBorderBrush}"
      BorderThickness="0,0,1,0">
      <Path 
        Name="Arrow"
        Fill="{StaticResource GlyphBrush}"
        HorizontalAlignment="Center"
        VerticalAlignment="Center"
        Data="M 0 0 L 4 4 L 8 0 Z"/>
    </Border>
      <ControlTemplate.Triggers>
      <Trigger Property="ToggleButton.IsMouseOver" Value="true">
        <Setter TargetName="Border" Property="Background" Value="{StaticResource DarkBrush}" />
      </Trigger>
      <Trigger Property="IsPressed" Value="true">
        <Setter TargetName="Border" Property="Background" Value="{StaticResource PressedBrush}" />
      </Trigger>
      <Trigger Property="IsChecked" Value="true">
        <Setter TargetName="Arrow" Property="Data" Value="M 0 4 L 4 0 L 8 4 Z" />
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
        <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
        <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
        <Setter TargetName="Arrow" Property="Fill" Value="{StaticResource DisabledForegroundBrush}" />
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
 
  <Style TargetType="{x:Type Expander}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Expander}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Name="ContentRow" Height="0"/>
            </Grid.RowDefinitions>
            <Border 
              Name="Border" 
              Grid.Row="0" 
              Background="{StaticResource LightBrush}"
              BorderBrush="{StaticResource NormalBorderBrush}"
              BorderThickness="1" 
              CornerRadius="2,2,0,0" >
              <Grid>
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="20" />
                  <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <ToggleButton
                  IsChecked="{Binding Path=IsExpanded,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"
                  OverridesDefaultStyle="True" 
                  Template="{StaticResource ExpanderToggleButton}" 
                  Background="{StaticResource NormalBrush}" />
                <ContentPresenter 
                  Grid.Column="1"
                  Margin="4" 
                  ContentSource="Header" 
                  RecognizesAccessKey="True" />
              </Grid>
            </Border>
            <Border 
              Name="Content" 
              Grid.Row="1" 
              Background="{StaticResource WindowBackgroundBrush}"
              BorderBrush="{StaticResource SolidBorderBrush}" 
              BorderThickness="1,0,1,1" 
              CornerRadius="0,0,2,2" >
              <ContentPresenter Margin="4" />
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsExpanded" Value="True">
              <Setter TargetName="ContentRow" Property="Height" Value="{Binding ElementName=Content,Path=DesiredHeight}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
              <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
              <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
            </Trigger>
 
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <!-- SimpleStyles: GroupBox -->
 
  <Style TargetType="{x:Type GroupBox}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type GroupBox}">
          <Grid>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Border 
              Grid.Row="0" 
              Background="{StaticResource LightBrush}"
              BorderBrush="{StaticResource NormalBorderBrush}"
              BorderThickness="1" 
              CornerRadius="2,2,0,0" >
              <ContentPresenter 
                Margin="4" 
                ContentSource="Header" 
                RecognizesAccessKey="True" />
            </Border>
            <Border 
              Grid.Row="1" 
              Background="{StaticResource WindowBackgroundBrush}"
              BorderBrush="{StaticResource SolidBorderBrush}" 
              BorderThickness="1,0,1,1" 
              CornerRadius="0,0,2,2" >
              <ContentPresenter 
                Margin="4" />
            </Border>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <!-- SimpleStyles: Label -->
 
  <Style x:Key="{x:Type Label}" TargetType="{x:Type Label}">
    <Setter Property="HorizontalContentAlignment" Value="Left"/>
    <Setter Property="VerticalContentAlignment" Value="Top"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Label}">
          <Border>
            <ContentPresenter 
              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
              RecognizesAccessKey="True"/>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="false">
              <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <!-- SimpleStyles: ListBox -->
 
  <Style x:Key="{x:Type ListBox}" TargetType="{x:Type ListBox}">
    <Setter Property="SnapsToDevicePixels" Value="true"/>
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <!-- Setter Property="FocusVisualStyle"	Value="{StaticResource ListBoxFocusVisual}"/ -->
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
    <Setter Property="MinWidth" Value="120"/>
    <Setter Property="MinHeight" Value="95"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ListBox}">
          <Border 
            Name="Border" 
            Background="{StaticResource WindowBackgroundBrush}"
            BorderBrush="{StaticResource SolidBorderBrush}"
            BorderThickness="1"
            CornerRadius="2">
            <ScrollViewer 
              Margin="0"
              Focusable="false">
              <StackPanel Margin="2" IsItemsHost="True" />
            </ScrollViewer>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="false">
              <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
              <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
            </Trigger>
            <Trigger Property="IsGrouping" Value="true">
              <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <!-- SimpleStyles: ListBoxItem -->
 
  <Style x:Key="{x:Type ListBoxItem}" TargetType="{x:Type ListBoxItem}">
    <Setter Property="SnapsToDevicePixels" Value="true"/>
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ListBoxItem}">
          <Border 
            Name="Border"
            Padding="2"
            SnapsToDevicePixels="true">
            <ContentPresenter />
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="true">
              <Setter TargetName="Border" Property="Background" Value="{StaticResource SelectedBackgroundBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
              <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <!-- SimpleStyles: Menu -->
 
  <Style x:Key="{x:Type Menu}" TargetType="{x:Type Menu}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Menu}">
          <Border 
            Background="{StaticResource LightBrush}"
            BorderBrush="{StaticResource NormalBorderBrush}"
            BorderThickness="1">
            <StackPanel ClipToBounds="True" Orientation="Horizontal" IsItemsHost="True"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <!-- SimpleStyles: ContextMenu -->
 
  <Style TargetType="{x:Type ContextMenu}">
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="Grid.IsSharedSizeScope" Value="true"/>
    <Setter Property="HasDropShadow" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ContextMenu}">
          <Border 
            Name="Border"
            Background="{StaticResource WindowBackgroundBrush}"
            BorderBrush="{StaticResource SolidBorderBrush}"
            BorderThickness="1" >
            <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Cycle"/>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="HasDropShadow" Value="true">
              <Setter TargetName="Border" Property="Padding" Value="0,3,0,3"/>
              <Setter TargetName="Border" Property="CornerRadius" Value="4"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <!-- SimpleStyles: MenuItem -->
 
  <Style x:Key="{x:Static MenuItem.SeparatorStyleKey}" TargetType="{x:Type Separator}">
    <Setter Property="Height" Value="1"/>
    <Setter Property="Margin" Value="0,4,0,4"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Separator}">
          <Border BorderBrush="{StaticResource SolidBorderBrush}" BorderThickness="1"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <!-- TopLevelHeader -->
 
  <ControlTemplate x:Key="{x:Static MenuItem.TopLevelHeaderTemplateKey}" TargetType="{x:Type MenuItem}">
    <Border Name="Border" >
      <Grid>
        <ContentPresenter 
          Margin="6,3,6,3" 
          ContentSource="Header"
          RecognizesAccessKey="True" />
        <Popup 
          Name="Popup"
          Placement="Bottom"
          IsOpen="{TemplateBinding IsSubmenuOpen}"
          AllowsTransparency="True" 
          Focusable="False"
          PopupAnimation="Fade">
          <Border 
            Name="SubmenuBorder"
            SnapsToDevicePixels="True"
            Background="{StaticResource WindowBackgroundBrush}"
            BorderBrush="{StaticResource SolidBorderBrush}"
            BorderThickness="1" >
            <StackPanel  
              IsItemsHost="True" 
              KeyboardNavigation.DirectionalNavigation="Cycle" />
          </Border>
        </Popup>
      </Grid>
    </Border>
    <ControlTemplate.Triggers>
      <Trigger Property="IsSuspendingPopupAnimation" Value="true">
        <Setter TargetName="Popup" Property="PopupAnimation" Value="None"/>
      </Trigger>
      <Trigger Property="IsHighlighted" Value="true">
        <Setter TargetName="Border" Property="Background" Value="{StaticResource NormalBrush}"/>
        <Setter TargetName="Border" Property="BorderBrush" Value="Transparent"/>
      </Trigger>
      <Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="True">
        <Setter TargetName="SubmenuBorder" Property="CornerRadius" Value="0,0,4,4"/>
        <Setter TargetName="SubmenuBorder" Property="Padding" Value="0,0,0,3"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
 
  <!-- TopLevelItem -->
 
  <ControlTemplate 
    x:Key="{x:Static MenuItem.TopLevelItemTemplateKey}" 
    TargetType="{x:Type MenuItem}">
    <Border Name="Border" >
      <Grid>
        <ContentPresenter 
          Margin="6,3,6,3" 
          ContentSource="Header"
          RecognizesAccessKey="True" />
      </Grid>
    </Border>
    <ControlTemplate.Triggers>
      <Trigger Property="IsHighlighted" Value="true">
        <Setter TargetName="Border" Property="Background" Value="{StaticResource NormalBrush}"/>
        <Setter TargetName="Border" Property="BorderBrush" Value="Transparent"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="False">
        <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
 
  <!-- SubmenuItem -->
 
  <ControlTemplate 
    x:Key="{x:Static MenuItem.SubmenuItemTemplateKey}" 
    TargetType="{x:Type MenuItem}">
    <Border Name="Border" >
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto" SharedSizeGroup="Icon"/>
          <ColumnDefinition Width="*" />
          <ColumnDefinition Width="Auto" SharedSizeGroup="Shortcut"/>
          <ColumnDefinition Width="13"/>
        </Grid.ColumnDefinitions>
        <ContentPresenter 
          Name="Icon"
          Margin="6,0,6,0"
          VerticalAlignment="Center"
          ContentSource="Icon"/>
        <Border 
          Name="Check"  
          Width="13" Height="13" 
          Visibility="Collapsed"
          Margin="6,0,6,0" 
          Background="{StaticResource NormalBrush}"
          BorderThickness="1"
          BorderBrush="{StaticResource NormalBorderBrush}">
          <Path 
            Name="CheckMark"
            Width="7" Height="7" 
            Visibility="Hidden" 
            SnapsToDevicePixels="False" 
            Stroke="{StaticResource GlyphBrush}"
            StrokeThickness="2"
            Data="M 0 0 L 7 7 M 0 7 L 7 0" />
        </Border>
        <ContentPresenter 
          Name="HeaderHost"
          Grid.Column="1"
          ContentSource="Header"
          RecognizesAccessKey="True"/>
        <TextBlock x:Name="InputGestureText"
          Grid.Column="2"
          Text="{TemplateBinding InputGestureText}"
          Margin="5,2,0,2"
          DockPanel.Dock="Right" />
      </Grid>
    </Border>
    <ControlTemplate.Triggers>
      <Trigger Property="Icon" Value="{x:Null}">
        <Setter TargetName="Icon" Property="Visibility" Value="Hidden"/>
      </Trigger>
      <Trigger Property="IsChecked" Value="true">
        <Setter TargetName="CheckMark" Property="Visibility" Value="Visible"/>
      </Trigger>
      <Trigger Property="IsCheckable" Value="true">
        <Setter TargetName="Check" Property="Visibility" Value="Visible"/>
        <Setter TargetName="Icon" Property="Visibility" Value="Hidden"/>
      </Trigger>
      <Trigger Property="IsHighlighted" Value="true">
        <Setter TargetName="Border" Property="Background" Value="{StaticResource SelectedBackgroundBrush}"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="false">
        <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
 
  <!-- SubmenuHeader -->
 
  <ControlTemplate 
    x:Key="{x:Static MenuItem.SubmenuHeaderTemplateKey}" 
    TargetType="{x:Type MenuItem}">
    <Border Name="Border" >
      <Grid>
        <Grid.ColumnDefinitions>
          <ColumnDefinition Width="Auto" SharedSizeGroup="Icon"/>
          <ColumnDefinition Width="*" />
          <ColumnDefinition Width="Auto" SharedSizeGroup="Shortcut"/>
          <ColumnDefinition Width="13"/>
        </Grid.ColumnDefinitions>
        <ContentPresenter 
          Name="Icon"
          Margin="6,0,6,0"
          VerticalAlignment="Center"
          ContentSource="Icon"/>
        <ContentPresenter 
          Name="HeaderHost"
          Grid.Column="1"
          ContentSource="Header"
          RecognizesAccessKey="True"/>
        <TextBlock x:Name="InputGestureText"
          Grid.Column="2"
          Text="{TemplateBinding InputGestureText}"
          Margin="5,2,2,2"
          DockPanel.Dock="Right"/>
        <Path 
          Grid.Column="3"
          HorizontalAlignment="Center"
          VerticalAlignment="Center"
          Data="M 0 0 L 0 7 L 4 3.5 Z" 
          Fill="{StaticResource GlyphBrush}" />
        <Popup 
          Name="Popup"
          Placement="Right"
          HorizontalOffset="-4" 
          IsOpen="{TemplateBinding IsSubmenuOpen}"
          AllowsTransparency="True" 
          Focusable="False"
          PopupAnimation="Fade">
          <Border 
            Name="SubmenuBorder"
            SnapsToDevicePixels="True"
            Background="{StaticResource WindowBackgroundBrush}"
            BorderBrush="{StaticResource SolidBorderBrush}"
            BorderThickness="1" >
            <StackPanel  
              IsItemsHost="True" 
              KeyboardNavigation.DirectionalNavigation="Cycle" />
          </Border>
        </Popup>
      </Grid>
    </Border>
    <ControlTemplate.Triggers>
      <Trigger Property="Icon" Value="{x:Null}">
        <Setter TargetName="Icon" Property="Visibility" Value="Collapsed"/>
      </Trigger>
      <Trigger Property="IsHighlighted" Value="true">
        <Setter TargetName="Border" Property="Background" Value="{StaticResource SelectedBackgroundBrush}"/>
      </Trigger>
      <Trigger SourceName="Popup" Property="Popup.AllowsTransparency" Value="True">
        <Setter TargetName="SubmenuBorder" Property="CornerRadius" Value="4"/>
        <Setter TargetName="SubmenuBorder" Property="Padding" Value="0,3,0,3"/>
      </Trigger>
      <Trigger Property="IsEnabled" Value="false">
        <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
 
  <!-- MenuItem Style -->
 
  <Style x:Key="{x:Type MenuItem}" TargetType="{x:Type MenuItem}">
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Style.Triggers>
      <Trigger Property="Role" Value="TopLevelHeader">
        <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.TopLevelHeaderTemplateKey}}"/>
        <Setter Property="Grid.IsSharedSizeScope" Value="true"/>
      </Trigger>
      <Trigger Property="Role" Value="TopLevelItem">
        <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.TopLevelItemTemplateKey}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuHeader">
        <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.SubmenuHeaderTemplateKey}}"/>
      </Trigger>
      <Trigger Property="Role" Value="SubmenuItem">
        <Setter Property="Template" Value="{StaticResource {x:Static MenuItem.SubmenuItemTemplateKey}}"/>
      </Trigger>
    </Style.Triggers>
  </Style>
 
  <!-- SimpleStyles: ProgressBar -->
 
  <Style x:Key="{x:Type ProgressBar}"
       TargetType="{x:Type ProgressBar}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ProgressBar}">
          <Grid MinHeight="14" MinWidth="200">
            <Border 
              Name="PART_Track" 
              CornerRadius="2" 
              Background="{StaticResource PressedBrush}"
              BorderBrush="{StaticResource SolidBorderBrush}"
              BorderThickness="1" />
            <Border 
              Name="PART_Indicator" 
              CornerRadius="2" 
              Background="{StaticResource DarkBrush}" 
              BorderBrush="{StaticResource NormalBorderBrush}" 
              BorderThickness="1" 
              HorizontalAlignment="Left" />
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <!-- Focus Visual -->
 
  <Style x:Key="RadioButtonFocusVisual">
    <Setter Property="Control.Template">
      <Setter.Value>
        <ControlTemplate>
          <Border>
            <Rectangle 
              Margin="15,0,0,0"
              StrokeThickness="1"
              Stroke="#60000000"
              StrokeDashArray="1 2"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <!-- SimpleStyles: RadioButton -->
 
  <Style x:Key="{x:Type RadioButton}" TargetType="{x:Type RadioButton}">
    <Setter Property="SnapsToDevicePixels" Value="true"/>
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Setter Property="FocusVisualStyle"	Value="{StaticResource RadioButtonFocusVisual}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type RadioButton}">
          <BulletDecorator Background="Transparent">
            <BulletDecorator.Bullet>
              <Grid Width="13" 
                Height="13" >
                <Ellipse x:Name="Border"  
                  Fill="{StaticResource NormalBrush}"
                  StrokeThickness="1"
                  Stroke="{StaticResource NormalBorderBrush}" />
                <Ellipse x:Name="CheckMark"
                  Margin="4"
                  Fill="{StaticResource GlyphBrush}" />
              </Grid>
            </BulletDecorator.Bullet>
            <ContentPresenter 
              Margin="4,0,0,0"
              VerticalAlignment="Center"
              HorizontalAlignment="Left"
              RecognizesAccessKey="True"/>
          </BulletDecorator>
          <ControlTemplate.Triggers>
            <Trigger Property="IsChecked" Value="false">
              <Setter TargetName="CheckMark" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="true">
              <Setter TargetName="Border" Property="Fill" Value="{StaticResource DarkBrush}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="true">
              <Setter TargetName="Border" Property="Fill" Value="{StaticResource PressedBrush}" />
              <Setter TargetName="Border" Property="Stroke" Value="{StaticResource GlyphBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
              <Setter TargetName="Border" Property="Fill" Value="{StaticResource DisabledBackgroundBrush}" />
              <Setter TargetName="Border" Property="Stroke" Value="#40000000" />
              <Setter Property="Foreground" Value="#80000000"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <Style x:Key="ScrollBarLineButton" TargetType="{x:Type RepeatButton}">
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Setter Property="Focusable" Value="false"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type RepeatButton}">
          <Border 
            Name="Border"
            Margin="1" 
            CornerRadius="2" 
            Background="{StaticResource NormalBrush}"
            BorderBrush="{StaticResource NormalBorderBrush}"
            BorderThickness="1">
            <Path 
              HorizontalAlignment="Center"
              VerticalAlignment="Center"
              Fill="{StaticResource GlyphBrush}"
              Data="{Binding Path=Content,RelativeSource={RelativeSource TemplatedParent}}" />
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsPressed" Value="true">
              <Setter TargetName="Border" Property="Background" Value="{StaticResource PressedBrush}" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
              <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <Style x:Key="ScrollBarPageButton" TargetType="{x:Type RepeatButton}">
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="Focusable" Value="false"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type RepeatButton}">
          <Border Background="Transparent" />
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <Style x:Key="ScrollBarThumb" TargetType="{x:Type Thumb}">
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="Focusable" Value="false"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Thumb}">
          <Border 
            CornerRadius="2" 
            Background="{TemplateBinding Background}"
            BorderBrush="{TemplateBinding BorderBrush}"
            BorderThickness="1" />
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <ControlTemplate x:Key="VerticalScrollBar" TargetType="{x:Type ScrollBar}">
    <Grid >
      <Grid.RowDefinitions>
        <RowDefinition MaxHeight="18"/>
        <RowDefinition Height="0.00001*"/>
        <RowDefinition MaxHeight="18"/>
      </Grid.RowDefinitions>
      <Border
        Grid.RowSpan="3"
        CornerRadius="2" 
        Background="#F0F0F0" />
      <RepeatButton 
        Grid.Row="0"                           
        Style="{StaticResource ScrollBarLineButton}"
        Height="18"
        Command="ScrollBar.LineUpCommand"
        Content="M 0 4 L 8 4 L 4 0 Z" />
      <Track 
        Name="PART_Track"
        Grid.Row="1"
        IsDirectionReversed="true">
        <Track.DecreaseRepeatButton>
          <RepeatButton 
            Style="{StaticResource ScrollBarPageButton}"
            Command="ScrollBar.PageUpCommand" />
        </Track.DecreaseRepeatButton>
        <Track.Thumb>
          <Thumb 
            Style="{StaticResource ScrollBarThumb}" 
            Margin="1,0,1,0"  
            Background="{StaticResource HorizontalNormalBrush}"
            BorderBrush="{StaticResource HorizontalNormalBorderBrush}" />
        </Track.Thumb>
        <Track.IncreaseRepeatButton>
          <RepeatButton 
            Style="{StaticResource ScrollBarPageButton}"
            Command="ScrollBar.PageDownCommand" />
        </Track.IncreaseRepeatButton>
      </Track>
      <RepeatButton 
        Grid.Row="3" 
        Style="{StaticResource ScrollBarLineButton}"
        Height="18"
        Command="ScrollBar.LineDownCommand"
        Content="M 0 0 L 4 4 L 8 0 Z"/>
    </Grid>
  </ControlTemplate>
 
  <ControlTemplate x:Key="HorizontalScrollBar" TargetType="{x:Type ScrollBar}">
    <Grid >
      <Grid.ColumnDefinitions>
        <ColumnDefinition MaxWidth="18"/>
        <ColumnDefinition Width="0.00001*"/>
        <ColumnDefinition MaxWidth="18"/>
      </Grid.ColumnDefinitions>
      <Border
        Grid.ColumnSpan="3"
        CornerRadius="2" 
        Background="#F0F0F0" />
      <RepeatButton 
        Grid.Column="0"                           
        Style="{StaticResource ScrollBarLineButton}"
        Width="18"
        Command="ScrollBar.LineLeftCommand"
        Content="M 4 0 L 4 8 L 0 4 Z" />
      <Track 
        Name="PART_Track"
        Grid.Column="1"
        IsDirectionReversed="False">
        <Track.DecreaseRepeatButton>
          <RepeatButton 
            Style="{StaticResource ScrollBarPageButton}"
            Command="ScrollBar.PageLeftCommand" />
        </Track.DecreaseRepeatButton>
        <Track.Thumb>
          <Thumb 
            Style="{StaticResource ScrollBarThumb}" 
            Margin="0,1,0,1"  
            Background="{StaticResource NormalBrush}"
            BorderBrush="{StaticResource NormalBorderBrush}" />
        </Track.Thumb>
        <Track.IncreaseRepeatButton>
          <RepeatButton 
            Style="{StaticResource ScrollBarPageButton}"
            Command="ScrollBar.PageRightCommand" />
        </Track.IncreaseRepeatButton>
      </Track>
      <RepeatButton 
        Grid.Column="3" 
        Style="{StaticResource ScrollBarLineButton}"
        Width="18"
        Command="ScrollBar.LineRightCommand"
        Content="M 0 0 L 4 4 L 0 8 Z"/>
    </Grid>
  </ControlTemplate>
 
  <Style x:Key="{x:Type ScrollBar}" TargetType="{x:Type ScrollBar}">
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Style.Triggers>
      <Trigger Property="Orientation" Value="Horizontal">
        <Setter Property="Width" Value="Auto"/>
        <Setter Property="Height" Value="18" />
        <Setter Property="Template" Value="{StaticResource HorizontalScrollBar}" />
      </Trigger>
      <Trigger Property="Orientation" Value="Vertical">
        <Setter Property="Width" Value="18"/>
        <Setter Property="Height" Value="Auto" />
        <Setter Property="Template" Value="{StaticResource VerticalScrollBar}" />
      </Trigger>
    </Style.Triggers>
  </Style>
 
  <!-- SimpleStyles: Separator  -->
 
  <Style TargetType="{x:Type Separator}">
    <Setter Property="Height" Value="1" />
    <Setter Property="Margin" Value="0,2,0,2" />
    <Setter Property="Focusable" Value="false" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Separator}">
          <Border BorderBrush="{StaticResource SolidBorderColor}" BorderThickness="1" />
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <!-- SimpleStyles: Slider -->
 
  <Style x:Key="SliderButtonStyle" TargetType="{x:Type RepeatButton}">
    <Setter Property="SnapsToDevicePixels" Value="true"/>
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Setter Property="IsTabStop" Value="false"/>
    <Setter Property="Focusable" Value="false"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type RepeatButton}">
          <Border Background="Transparent" />
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <Style x:Key="SliderThumbStyle" TargetType="{x:Type Thumb}">
    <Setter Property="SnapsToDevicePixels" Value="true"/>
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Setter Property="Height" Value="14"/>
    <Setter Property="Width" Value="14"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Thumb}">
          <Ellipse 
            Name="Ellipse" 
            Fill="{StaticResource NormalBrush}"
            Stroke="{StaticResource NormalBorderBrush}"
            StrokeThickness="1" />
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter TargetName="Ellipse" Property="Fill" Value="{StaticResource DarkBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
              <Setter TargetName="Ellipse" Property="Fill" Value="{StaticResource DisabledBackgroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <ControlTemplate x:Key="HorizontalSlider" TargetType="{x:Type Slider}">
    <Grid>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto" MinHeight="{TemplateBinding Slider.MinHeight}"/>
        <RowDefinition Height="Auto"/>
      </Grid.RowDefinitions>
      <TickBar 
        Name="TopTick"
        SnapsToDevicePixels="True" 
        Placement="Top"
        Fill="{StaticResource GlyphBrush}"
        Height="4"
        Visibility="Collapsed" />
      <Border 
        Name="TrackBackground"
        Margin="0"
        CornerRadius="2" 
        Height="4"
        Grid.Row="1"
        Background="{StaticResource LightBrush}" 
        BorderBrush="{StaticResource NormalBorderBrush}"
        BorderThickness="1" />
      <Track Grid.Row="1" Name="PART_Track">
        <Track.DecreaseRepeatButton>
          <RepeatButton 
            Style="{StaticResource SliderButtonStyle}"
            Command="Slider.DecreaseLarge" />
        </Track.DecreaseRepeatButton>
        <Track.Thumb>
          <Thumb Style="{StaticResource SliderThumbStyle}" />
        </Track.Thumb>
        <Track.IncreaseRepeatButton>
          <RepeatButton 
            Style="{StaticResource SliderButtonStyle}"
            Command="Slider.IncreaseLarge" />
        </Track.IncreaseRepeatButton>
      </Track>
      <TickBar 
        Name="BottomTick"
        SnapsToDevicePixels="True" 
        Grid.Row="2"
        Fill="{TemplateBinding Foreground}"
        Placement="Bottom"
        Height="4"
        Visibility="Collapsed" />
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="TickPlacement" Value="TopLeft">
        <Setter TargetName="TopTick" Property="Visibility" Value="Visible"/>
      </Trigger>
      <Trigger Property="TickPlacement" Value="BottomRight">
        <Setter TargetName="BottomTick" Property="Visibility" Value="Visible"/>
      </Trigger>
      <Trigger Property="TickPlacement" Value="Both">
        <Setter TargetName="TopTick" Property="Visibility" Value="Visible"/>
        <Setter TargetName="BottomTick" Property="Visibility" Value="Visible"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
 
  <ControlTemplate x:Key="VerticalSlider" TargetType="{x:Type Slider}">
    <Grid>
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="Auto" MinWidth="{TemplateBinding Slider.MinWidth}"/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <TickBar 
        Name="TopTick"
        SnapsToDevicePixels="True" 
        Placement="Left"
        Fill="{StaticResource GlyphBrush}"
        Width="4"
        Visibility="Collapsed" />
      <Border 
        Name="TrackBackground"
        Margin="0"
        CornerRadius="2" 
        Width="4"
        Grid.Column="1"
        Background="{StaticResource HorizontalLightBrush}" 
        BorderBrush="{StaticResource HorizontalNormalBorderBrush}"
        BorderThickness="1" />
      <Track Grid.Column="1" Name="PART_Track">
        <Track.DecreaseRepeatButton>
          <RepeatButton 
            Style="{StaticResource SliderButtonStyle}"
            Command="Slider.DecreaseLarge" />
        </Track.DecreaseRepeatButton>
        <Track.Thumb>
          <Thumb Style="{StaticResource SliderThumbStyle}" />
        </Track.Thumb>
        <Track.IncreaseRepeatButton>
          <RepeatButton 
            Style="{StaticResource SliderButtonStyle}"
            Command="Slider.IncreaseLarge" />
        </Track.IncreaseRepeatButton>
      </Track>
      <TickBar 
        Name="BottomTick"
        SnapsToDevicePixels="True" 
        Grid.Column="2"
        Fill="{TemplateBinding Foreground}"
        Placement="Right"
        Width="4"
        Visibility="Collapsed" />
    </Grid>
    <ControlTemplate.Triggers>
      <Trigger Property="TickPlacement" Value="TopLeft">
        <Setter TargetName="TopTick" Property="Visibility" Value="Visible"/>
      </Trigger>
      <Trigger Property="TickPlacement" Value="BottomRight">
        <Setter TargetName="BottomTick" Property="Visibility" Value="Visible"/>
      </Trigger>
      <Trigger Property="TickPlacement" Value="Both">
        <Setter TargetName="TopTick" Property="Visibility" Value="Visible"/>
        <Setter TargetName="BottomTick" Property="Visibility" Value="Visible"/>
      </Trigger>
    </ControlTemplate.Triggers>
  </ControlTemplate>
 
  <Style TargetType="{x:Type Slider}">
    <Setter Property="SnapsToDevicePixels" Value="true"/>
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Style.Triggers>
      <Trigger Property="Orientation" Value="Horizontal">
        <Setter Property="MinWidth" Value="104" />
        <Setter Property="MinHeight" Value="21" />
        <Setter Property="Template" Value="{StaticResource HorizontalSlider}" />
      </Trigger>
      <Trigger Property="Orientation" Value="Vertical">
        <Setter Property="MinWidth" Value="21" />
        <Setter Property="MinHeight" Value="104" />
        <Setter Property="Template" Value="{StaticResource VerticalSlider}" />
      </Trigger>
    </Style.Triggers>
  </Style>
 
  <!-- SimpleStyles: TabControl -->
 
  <Style  TargetType="{x:Type TabControl}">
    <Setter Property="OverridesDefaultStyle" Value="True" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type TabControl}">
          <Grid KeyboardNavigation.TabNavigation="Local">
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <TabPanel 
              Name="HeaderPanel"
              Grid.Row="0"
              Panel.ZIndex="1" 
              Margin="0,0,4,-1" 
              IsItemsHost="True"
              KeyboardNavigation.TabIndex="1"
              Background="Transparent" />
            <Border 
              Name="Border" 
              Grid.Row="1" 
              Background="{StaticResource WindowBackgroundBrush}" 
              BorderBrush="{StaticResource SolidBorderBrush}" 
              BorderThickness="1" 
              CornerRadius="2" 
              KeyboardNavigation.TabNavigation="Local"
              KeyboardNavigation.DirectionalNavigation="Contained"
              KeyboardNavigation.TabIndex="2" >
              <ContentPresenter 
                Name="PART_SelectedContentHost"
                Margin="4"
                ContentSource="SelectedContent" />
            </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}" />
              <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <!-- SimpleStyles: TabItem -->
 
  <Style TargetType="{x:Type TabItem}">
    <!-- Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}"/ -->
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type TabItem}">
          <Grid>
          <Border 
            Name="Border"
            Margin="0,0,-4,0" 
            Background="{StaticResource LightBrush}"
            BorderBrush="{StaticResource SolidBorderBrush}" 
            BorderThickness="1,1,1,1" 
            CornerRadius="2,12,0,0" >
            <ContentPresenter x:Name="ContentSite"
              VerticalAlignment="Center"
              HorizontalAlignment="Center"
              ContentSource="Header"
              Margin="12,2,12,2"
              RecognizesAccessKey="True"/>
          </Border>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected" Value="True">
              <Setter Property="Panel.ZIndex" Value="100" />
              <Setter TargetName="Border" Property="Background" Value="{StaticResource WindowBackgroundBrush}" />
              <Setter TargetName="Border" Property="BorderThickness" Value="1,1,1,0" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}" />
              <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBorderBrush}" />
              <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}" />
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <!-- SimpleStyles: TextBox -->
 
  <Style x:Key="{x:Type TextBox}" TargetType="{x:Type TextBox}">
    <Setter Property="SnapsToDevicePixels" Value="True"/>
    <Setter Property="OverridesDefaultStyle" Value="True"/>
    <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="MinWidth" Value="120"/>
    <Setter Property="MinHeight" Value="20"/>
    <Setter Property="AllowDrop" Value="true"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type TextBoxBase}">
          <Border 
            Name="Border"
            CornerRadius="2" 
            Padding="2"
            Background="{StaticResource WindowBackgroundBrush}"
            BorderBrush="{StaticResource SolidBorderBrush}"
            BorderThickness="1" >
            <ScrollViewer Margin="0" x:Name="PART_ContentHost"/>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsEnabled" Value="False">
              <Setter TargetName="Border" Property="Background" Value="{StaticResource DisabledBackgroundBrush}"/>
              <Setter TargetName="Border" Property="BorderBrush" Value="{StaticResource DisabledBackgroundBrush}"/>
              <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <!-- SimpleStyles: ToolTip -->
 
  <Style x:Key="{x:Type ToolTip}" TargetType="{x:Type ToolTip}">
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Setter Property="HasDropShadow" Value="True"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ToolTip}">
          <Border Name="Border"
            Background="{StaticResource LightBrush}"
            BorderBrush="{StaticResource SolidBorderBrush}"
            BorderThickness="1"
            Width="{TemplateBinding Width}"
            Height="{TemplateBinding Height}">
            <ContentPresenter
              Margin="4" 
              HorizontalAlignment="Left"
              VerticalAlignment="Top" />
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="HasDropShadow" Value="true">
              <Setter TargetName="Border" Property="CornerRadius" Value="4"/>
              <Setter TargetName="Border" Property="SnapsToDevicePixels" Value="true"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <!-- SimpleStyles: TreeView -->
 
  <Style x:Key="{x:Type TreeView}" TargetType="{x:Type TreeView}">
    <Setter Property="OverridesDefaultStyle" Value="True" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type TreeView}">
          <Border 
            Name="Border" 
            CornerRadius="1" 
            Background="{StaticResource WindowBackgroundBrush}"
            BorderBrush="{StaticResource SolidBorderBrush}"
            BorderThickness="1" >
            <ScrollViewer 
              Focusable="False"
              CanContentScroll="False"
              Padding="4">
              <ItemsPresenter/>
            </ScrollViewer>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  <!-- SimpleStyles: TreeViewItem -->
 
  <Style x:Key="ExpandCollapseToggleStyle" TargetType="{x:Type ToggleButton}">
    <Setter Property="Focusable" Value="False"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ToggleButton}">
          <Grid
            Width="15"
            Height="13"
            Background="Transparent">
            <Path x:Name="ExpandPath"
              HorizontalAlignment="Left" 
              VerticalAlignment="Center" 
              Margin="1,1,1,1"
              Fill="{StaticResource GlyphBrush}"
              Data="M 4 0 L 8 4 L 4 8 Z"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsChecked"
                 Value="True">
              <Setter Property="Data"
                  TargetName="ExpandPath"
                  Value="M 0 4 L 8 4 L 4 8 Z"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style TargetType="{x:Type TreeViewItem}">
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type TreeViewItem}">
          <Grid>
            <Grid.ColumnDefinitions>
              <ColumnDefinition MinWidth="19" Width="Auto"/>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
              <RowDefinition Height="Auto"/>
              <RowDefinition/>
            </Grid.RowDefinitions>
            <ToggleButton 
              x:Name="Expander"
              Style="{StaticResource ExpandCollapseToggleStyle}"
              IsChecked="{Binding Path=IsExpanded,RelativeSource={RelativeSource TemplatedParent}}"
              ClickMode="Press"/>
            <Border 
              Name="Border" 
              Grid.Column="1" 
              Padding="1">
              <ContentPresenter 
                x:Name="PART_Header"
                ContentSource="Header"
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" />
            </Border>
            <ItemsPresenter 
              x:Name="ItemsHost"
              Grid.Row="1"
              Grid.Column="1"
              Grid.ColumnSpan="2"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsExpanded" Value="false">
              <Setter TargetName="ItemsHost" Property="Visibility" Value="Collapsed"/>
            </Trigger>
            <Trigger Property="HasItems" Value="false">
              <Setter TargetName="Expander" Property="Visibility" Value="Hidden"/>
            </Trigger>
            <Trigger Property="IsSelected" Value="true">
              <Setter TargetName="Border" Property="Background" Value="{StaticResource SelectedBackgroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
 
  </Page.Resources>
 
  <Grid>  
     <!-- INSERT CONTROLS HERE -->
  </Grid>
</Page>