<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"    
  xmlns:cc="using:StockAnalysis.Partial.CustomControls" 
  xmlns:converter="using:StockAnalysis.Converter">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/Resources/ResourceDictionary.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Style x:Key="DropdownToggleButton" TargetType="ToggleButton">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="ClickMode" Value="Press"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToggleButton">
                    <Border x:Name="templateRoot" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" >
                        <Border x:Name="splitBorder" BorderBrush="Transparent" BorderThickness="1" HorizontalAlignment="Right"  Width="10.5" Height="6.3" Margin="8,0">
                            <Path x:Name="Arrow" Data="F1 M 5.229,4.155 L 1.074,0.000 L 0.000,1.074 L 5.229,6.303 L 10.459,1.074 L 9.385,0.000 L 5.229,4.155 Z" Fill="#FF606060" HorizontalAlignment="Center" Margin="0" VerticalAlignment="Center" Stretch="Fill"/>
                        </Border>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="cc:Title">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="cc:Title">
                    <Grid Background="{TemplateBinding Background}">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Image Margin="10, 0, 0, 0" Source="{TemplateBinding IconSource}" Stretch="UniformToFill" Width="32" Height="32" VerticalAlignment="Center"/>
                        <ContentPresenter Grid.Column="1" VerticalAlignment="Center" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="cc:ContentSchema">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="cc:ContentSchema">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" MinWidth="240" MaxWidth="600" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>

                        <Grid Grid.Column="0" Background="White">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="58" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>

                            <Border Grid.Row="0" Background="White" BorderBrush="#E3E3E3" BorderThickness="0,0,0,1" />
                            <ContentPresenter Grid.Row="1" Content="{TemplateBinding Nav}" />
                        </Grid>

                        <Grid Grid.Column="1" Background="#E3E3E3">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="1" />
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="1" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <ContentPresenter Content="{TemplateBinding Settings}" Height="32"  />


                            <ContentPresenter Grid.Row="2" Height="24" Content="{TemplateBinding AnnotitionsSettings}" />

                            <ContentPresenter  Content="{TemplateBinding Chart}" Grid.Row="4" />

                        </Grid>

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="cc:DropdownMenu">
        <Setter Property="MaxDropDownHeight" Value="600" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="ItemContainerStyle">
            <Setter.Value>
                <Style TargetType="ComboBoxItem">
                    <Setter Property="Padding" Value="15,7"/>
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="ComboBoxItem">
                                <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" >
                                    <ContentPresenter FontWeight="Normal" FontSize="12" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                                </Border>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="cc:DropdownMenu">
                    <Grid x:Name="templateRoot" >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="0"/>
                        </Grid.ColumnDefinitions>
                        <Popup x:Name="PART_Popup" IsLightDismissEnabled="True" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
                            <!--<Themes:SystemDropShadowChrome x:Name="shadow" Color="Transparent" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=templateRoot}">
                               
                            </Themes:SystemDropShadowChrome>-->
                            <Border x:Name="DropDownBorder" BorderThickness="0,2,0,0" CornerRadius="3" Background="{StaticResource PaperWhite1000}" Margin="10"  MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=toggleButton}">

                                <Grid x:Name="grid">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="*" />
                                    </Grid.RowDefinitions>
                                    <ContentPresenter Margin="5,15,5,5" Content="{TemplateBinding DropdownHeader}"  />
                                    <ScrollViewer x:Name="DropDownScrollViewer" Margin="0,0,0,15" Grid.Row="1" VerticalScrollBarVisibility="Auto">
                                        <Grid>
                                            <ItemsPresenter x:Name="ItemsPresenter"/>
                                        </Grid>
                                    </ScrollViewer>
                                </Grid>
                            </Border>
                        </Popup>
                        <ToggleButton x:Name="toggleButton" Margin="0,0,0,0" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
                            Style="{StaticResource DropdownToggleButton}" />

                        <ContentPresenter FontWeight="Normal" FontSize="12" x:Name="displayPresenter" Margin="15,0,15,0" ContentTemplate="{TemplateBinding DisplayTemplate}" Content="{TemplateBinding Display}"  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" IsHitTestVisible="False" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="cc:NavList">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="cc:NavList">
                    <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="0">
                        <ScrollViewer Padding="{TemplateBinding Padding}" VerticalScrollBarVisibility="Auto">
                            <ItemsPresenter/>
                        </ScrollViewer>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ItemContainerStyle">
            <Setter.Value>
                <Style TargetType="ListBoxItem">
                    <Setter Property="Background" Value="White"/>
                    <Setter Property="BorderBrush" Value="{StaticResource PaperWhite800}"/>
                    <Setter Property="BorderThickness" Value="1"/>
                    <Setter Property="VerticalAlignment" Value="Stretch" />
                    <Setter Property="VerticalContentAlignment" Value="Center" />
                    <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
                    <Setter Property="Padding" Value="15,3"/>
                    <Setter Property="UseSystemFocusVisuals" Value="True"/>
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="ListBoxItem">
                                <Border x:Name="templateRoot">
                                    <Grid Margin="{TemplateBinding Padding}" MinHeight="24">
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*"/>
                                            <ColumnDefinition Width="Auto" />
                                            <ColumnDefinition Width="Auto"/>
                                        </Grid.ColumnDefinitions>
                                        <ContentPresenter FontWeight="Normal" FontSize="12" x:Name="contentPresenter" Margin="0,0,10,0" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Foreground="{Binding IsSelected, RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={StaticResource SelectedListBoxItem2ColorConverter}}"/>
                                        <Border x:Name="radioButtonBorder" Grid.Column="2" Margin="10,0,0,0" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="100" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                                            <Ellipse x:Name="optionMark" Margin="3" Fill="#398dff" MinWidth="6" MinHeight="6" Opacity="{Binding IsSelected, RelativeSource={RelativeSource Mode=TemplatedParent}, Converter={StaticResource OpacitySelectedConverter}}" />
                                        </Border>
                                    </Grid>
                                </Border>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="cc:DropdownControl">
        <Setter Property="Background" Value="{StaticResource PaperWhite1000}"/>
        <Setter Property="Foreground" Value="{StaticResource Grey700}"/>
        <Setter Property="MaxDropDownHeight" Value="600" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="cc:DropdownControl">
                    <Grid x:Name="templateRoot">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal">
                                    <VisualState.Setters>
                                        <Setter Target="templateRoot.Background" Value="#FFFFFF"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="PointerOver">
                                    <VisualState.Setters>
                                        <Setter Target="templateRoot.Background" Value="#FFDDDDDD"/>
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="3*"/>                            
                            <ColumnDefinition Width="1*"/>
                        </Grid.ColumnDefinitions>
                        <Popup x:Name="PART_Popup" IsLightDismissEnabled="True" HorizontalOffset="{Binding CustomHorizontalOffset, RelativeSource={RelativeSource Mode=TemplatedParent}}" VerticalOffset="{Binding CustomVertialOffset, RelativeSource={RelativeSource Mode=TemplatedParent}}"
                   VerticalAlignment="Bottom" Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
                            <Border x:Name="border" BorderThickness="1,1,1,1" BorderBrush="{StaticResource Grey300}" Background="{StaticResource PaperWhite1000}" Margin="10" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=toggleButton}">
                                <Grid x:Name="grid">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="*" />
                                    </Grid.RowDefinitions>
                                    <ContentPresenter FontWeight="Normal" FontSize="12" Margin="5,15,5,5" Content="{TemplateBinding DropdownHeader}"  />
                                    <ScrollViewer x:Name="DropDownScrollViewer" Margin="0,0,0,15" Grid.Row="1" VerticalScrollBarVisibility="Auto" >
                                        <Grid>
                                            <ContentPresenter x:Name="contentPresenter" Margin="0" Content="{TemplateBinding Content}"/>
                                        </Grid>
                                    </ScrollViewer>
                                </Grid>
                            </Border>
                        </Popup>
                        <ContentPresenter Margin="10, 0, 0, 0" Grid.Column="0" FontWeight="Normal" FontSize="12" x:Name="displayPresenter" ContentTemplate="{TemplateBinding DisplayTemplate}" Content="{TemplateBinding Display}" HorizontalAlignment="Center" IsHitTestVisible="False" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        <ToggleButton Grid.Column="1" x:Name="toggleButton" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" HorizontalAlignment="Center" Background="{Binding Background, ElementName=templateRoot, Mode=TwoWay}" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" 
                                      Style="{StaticResource DropdownToggleButton}"/>

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="cc:MyComboBox">
        <Setter Property="MaxDropDownHeight" Value="600" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="cc:MyComboBox">
                    <Grid x:Name="templateRoot" >
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal">
                                    <VisualState.Setters>
                                        <Setter Target="templateRoot.Background" Value="#FFFFFF"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="PointerOver">
                                    <VisualState.Setters>
                                        <Setter Target="templateRoot.Background" Value="#FFDDDDDD"/>
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="1*"/>
                            <ColumnDefinition Width="1*"/>
                        </Grid.ColumnDefinitions>
                        <Popup x:Name="PART_Popup" IsLightDismissEnabled="True" HorizontalOffset="{Binding CustomHorizontalOffset, RelativeSource={RelativeSource Mode=TemplatedParent}}" VerticalOffset="{Binding CustomVertialOffset, RelativeSource={RelativeSource Mode=TemplatedParent}}"
                               Grid.ColumnSpan="2" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}">
                            <Border BorderThickness="1,1,1,1" BorderBrush="{StaticResource Grey300}" CornerRadius="3" Background="{StaticResource PaperWhite1000}" Margin="10" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{Binding ActualWidth, ElementName=toggleButton}">
                                <Grid x:Name="grid">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="*" />
                                    </Grid.RowDefinitions>
                                    <ContentPresenter Margin="5,15,5,5" Content="{TemplateBinding DropdownHeader}"  />
                                    <ScrollViewer x:Name="DropDownScrollViewer" Margin="0,0,0,15" Grid.Row="1" VerticalScrollBarVisibility="Auto" >
                                        <Grid >
                                            <ContentPresenter FontWeight="Normal" FontSize="12" x:Name="contentPresenter" Margin="0" Content="{TemplateBinding Content}"/>
                                        </Grid>
                                    </ScrollViewer>
                                </Grid>
                            </Border>
                        </Popup>
                        <ContentPresenter Grid.Column="0" FontWeight="Normal" FontSize="12" x:Name="displayPresenter" ContentTemplate="{TemplateBinding DisplayTemplate}" Content="{TemplateBinding Display}" HorizontalAlignment="Center" IsHitTestVisible="False" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        <ToggleButton Grid.Column="1" x:Name="toggleButton" Margin="0,0,0,0" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" HorizontalAlignment="Center" Background="{TemplateBinding Background}" IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" 
                                      Style="{StaticResource DropdownToggleButton}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="cc:SimpleButton">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="cc:SimpleButton">
                    <Border x:Name="border" Background="Transparent"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="1" CornerRadius="4" Opacity=".8" >
                        <Border x:Name="innerBorder" Background="{TemplateBinding Background}"
                            BorderBrush="Transparent"
                            BorderThickness="1" CornerRadius="3" >
                            <ContentPresenter Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"  />
                        </Border>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="cc:SettableRadioButton">
        <Setter Property="Background" Value="{StaticResource PaperWhite1000}"/>
        <Setter Property="BorderBrush" Value="{StaticResource PaperWhite700}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate x:Name="contolTemplate" TargetType="cc:SettableRadioButton">
                    <Border x:Name="templateRoot" Background="Transparent" >
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualState x:Name="Checked">
                                    <VisualState.Setters>
                                        <Setter Target="optionMark.Opacity" Value="1"/>
                                        <Setter Target="contentPresenter.Foreground" Value="#4285f4"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="Unchecked"/>
                                <VisualState x:Name="Indeterminate">
                                    <VisualState.Setters>
                                        <Setter Target="optionMark.Opacity" Value="0"/>
                                        <Setter Target="contentPresenter.Foreground" Value="#616161"/>
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid Margin="{TemplateBinding Padding}">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <ContentPresenter FontWeight="Normal" FontSize="12" x:Name="contentPresenter" Margin="0,0,10,0" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>

                            <Button x:Name="setting" Grid.Column="2" Visibility="{Binding IsShowSetting, Mode=TwoWay, Converter={StaticResource Boolean2VisibilityConverter}, RelativeSource={RelativeSource Mode=TemplatedParent}}"  Margin="10,0,0,0" Background="Transparent" BorderBrush="Transparent"
                                         Padding="4"
                                         HorizontalAlignment="Center" VerticalAlignment="Center"
                                             Command="{Binding SettingCommand, Mode=TwoWay,RelativeSource={RelativeSource Mode=TemplatedParent}}" CommandParameter="{Binding CommandParameter, Mode=TwoWay,RelativeSource={RelativeSource Mode=TemplatedParent}}">
                                <Path Visibility="Visible" Data="M12,7.6c0,0.1,0,0.2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.6,0.5c0.1,0,0.1,0.1,0.2,0.1
	C11.9,7.4,11.9,7.5,12,7.6L12,7.6z M6,8.8c0.4,0,0.8-0.1,1.1-0.2C7.4,8.4,7.7,8.2,8,8c0.3-0.3,0.5-0.6,0.6-0.9
	C8.7,6.7,8.8,6.4,8.8,6S8.7,5.2,8.6,4.9C8.4,4.6,8.2,4.3,8,4C7.7,3.7,7.4,3.5,7.1,3.4C6.7,3.3,6.4,3.2,6,3.2c-0.4,0-0.7,0.1-1.1,0.2
	C4.6,3.5,4.3,3.7,4,4C3.8,4.3,3.6,4.6,3.4,4.9C3.3,5.2,3.2,5.6,3.2,6c0,0.4,0.1,0.7,0.2,1.1C3.6,7.4,3.8,7.7,4,8
	c0.3,0.3,0.5,0.5,0.9,0.6C5.2,8.7,5.6,8.8,6,8.8L6,8.8z M6,8.8" Fill="{StaticResource Grey700}" />
                            </Button>
                            <Border x:Name="radioButtonBorder" Grid.Column="3" Margin="10,0,0,0" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="100" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"  >
                                <Ellipse x:Name="optionMark" Margin="3" Fill="{StaticResource Blue500}" MinWidth="6" MinHeight="6" Opacity="0"  />
                            </Border>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="cc:SettableCheckBox">
        <Setter Property="Background" Value="{StaticResource PaperWhite1000}"/>
        <Setter Property="BorderBrush" Value="{StaticResource PaperWhite700}"/>
        <Setter Property="Foreground" Value="{StaticResource Grey700}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="cc:SettableCheckBox">
                    <Border x:Name="templateRoot" Background="Transparent">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualState x:Name="Checked">
                                    <VisualState.Setters>
                                        <Setter Target="optionMark.Opacity" Value="1"/>
                                        <Setter Target="setting.Visibility" Value="Visible"/>
                                        <Setter Target="contentPresenter.Foreground" Value="#4285f4"/>
                                    </VisualState.Setters>
                                </VisualState>
                                <VisualState x:Name="Unchecked"/>
                                <VisualState x:Name="Indeterminate">
                                    <VisualState.Setters>
                                        <Setter Target="optionMark.Opacity" Value="0"/>
                                        <Setter Target="setting.Visibility" Value="Collapsed"/>
                                        <Setter Target="contentPresenter.Foreground" Value="#616161"/>
                                    </VisualState.Setters>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid Margin="{TemplateBinding Padding}">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>

                            <ContentPresenter x:Name="contentPresenter" FontWeight="Normal" FontSize="12" Grid.Column="0" Margin="0,0,10,0" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>

                            <Path x:Name="optionMark" Grid.Column="1" Margin="5,0,5,0" Fill="{StaticResource Blue500}" Opacity="0"
                              HorizontalAlignment="Center" VerticalAlignment="Center"
                                  Data="M9.8,1.4L4.5,6.6c0,0-0.1,0.1-0.1,0.1C4.3,6.9,4.1,6.9,3.9,6.9c-0.2,0-0.4-0.1-0.6-0.2L0.2,3.6c-0.3-0.3-0.3-0.8,0-1.1
			c0.3-0.3,0.8-0.3,1.1,0L3.9,5l4.7-4.7c0.3-0.3,0.8-0.3,1.1,0C10.1,0.6,10.1,1.1,9.8,1.4L9.8,1.4z M9.8,1.4"
                                   />

                            <Button x:Name="setting" Grid.Column="3" Visibility="Collapsed"  Margin="10,0,0,0" Background="Transparent" BorderBrush="Transparent"
                                         Padding="4"
                                         HorizontalAlignment="Center" VerticalAlignment="Center"
                                             Command="{Binding SettingCommand, Mode=TwoWay,RelativeSource={RelativeSource Mode=TemplatedParent}}" CommandParameter="{Binding CommandParameter, Mode=TwoWay,RelativeSource={RelativeSource Mode=TemplatedParent}}">
                                <Path Visibility="Visible" Data="M12,7.6c0,0.1,0,0.2,0,0.4c0,0.1-0.1,0.3-0.1,0.4c-0.1,0.2-0.1,0.3-0.2,0.4c-0.1,0.1-0.2,0.2-0.3,0.3
	c-0.1,0.1-0.2,0.1-0.3,0.1c-0.1,0-0.2,0-0.3-0.1c-0.1,0-0.2,0-0.3-0.1c-0.1,0-0.3,0-0.4,0c-0.1,0-0.3,0-0.4,0.1
	c-0.1,0-0.2,0.1-0.3,0.2C9.1,9.6,9,9.8,9,10.1c0,0.3,0,0.5,0.1,0.8c0.1,0.2,0.1,0.3,0,0.5c-0.1,0.1-0.1,0.1-0.2,0.2
	c-0.1,0.1-0.2,0.1-0.4,0.2c-0.1,0.1-0.3,0.1-0.4,0.1C7.9,12,7.8,12,7.6,12c-0.1,0-0.2,0-0.2-0.1c-0.1-0.1-0.1-0.1-0.1-0.2h0
	C7.2,11.5,7,11.2,6.8,11c-0.2-0.2-0.5-0.3-0.8-0.3c-0.3,0-0.6,0.1-0.8,0.3c-0.2,0.2-0.4,0.4-0.5,0.7c0,0.1-0.1,0.2-0.2,0.2
	C4.4,12,4.3,12,4.2,12c-0.1,0-0.3,0-0.4-0.1c-0.2,0-0.3-0.1-0.5-0.2c-0.2-0.1-0.3-0.1-0.4-0.2c-0.1-0.1-0.2-0.2-0.3-0.3
	c0-0.1-0.1-0.1-0.1-0.2c0-0.1,0-0.2,0.1-0.3c0.1-0.2,0.1-0.4,0.1-0.7c0-0.3-0.1-0.5-0.3-0.7C2.4,9.2,2.2,9.1,2.1,9.1
	c-0.2,0-0.3-0.1-0.5,0c-0.2,0-0.4,0-0.6,0.1c-0.1,0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2-0.1,0.3-0.1
	c0.1,0,0.2,0,0.3,0.1c0.1,0.1,0.2,0.3,0.3,0.5C11.9,3.7,12,3.9,12,4.2c0,0.1,0,0.3-0.1,0.3c-0.1,0.1-0.1,0.1-0.2,0.2
	C11.5,4.8,11.2,5,11,5.2c-0.2,0.2-0.3,0.5-0.3,0.8c0,0.3,0.1,0.5,0.2,0.8c0.2,0.2,0.4,0.4,0.6,0.5c0.1,0,0.1,0.1,0.2,0.1
	C11.9,7.4,11.9,7.5,12,7.6L12,7.6z M6,8.8c0.4,0,0.8-0.1,1.1-0.2C7.4,8.4,7.7,8.2,8,8c0.3-0.3,0.5-0.6,0.6-0.9
	C8.7,6.7,8.8,6.4,8.8,6S8.7,5.2,8.6,4.9C8.4,4.6,8.2,4.3,8,4C7.7,3.7,7.4,3.5,7.1,3.4C6.7,3.3,6.4,3.2,6,3.2c-0.4,0-0.7,0.1-1.1,0.2
	C4.6,3.5,4.3,3.7,4,4C3.8,4.3,3.6,4.6,3.4,4.9C3.3,5.2,3.2,5.6,3.2,6c0,0.4,0.1,0.7,0.2,1.1C3.6,7.4,3.8,7.7,4,8
	c0.3,0.3,0.5,0.5,0.9,0.6C5.2,8.7,5.6,8.8,6,8.8L6,8.8z M6,8.8" Fill="{StaticResource Grey700}" />
                            </Button>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="cc:FlatButton">
        <Setter Property="Padding" Value="12,6" />
        <Setter Property="Background" Value="#398dff" />
        <Setter Property="Foreground" Value="White" />
        <Setter Property="FontWeight" Value="DemiBold" />
        <Setter Property="BorderBrush" Value="#2f7acc" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="cc:FlatButton">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                        <Border BorderThickness="1">
                            <Border.BorderBrush>
                                <LinearGradientBrush EndPoint="0,1" StartPoint="0,.5">
                                    <GradientStop Color="#44FFFFFF" Offset="0"/>
                                    <GradientStop Color="Transparent" Offset="1"/>
                                </LinearGradientBrush>
                            </Border.BorderBrush>
                            <ContentPresenter Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>
                        </Border>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="cc:SettingList">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="cc:SettingList">
                    <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="0" >
                        <ItemsPresenter/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="cc:MyColorPicker">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="cc:MyColorPicker">
                    <cc:DropdownControl IsPopupCenter="True" Margin="1,0,0,0" Display="{Binding SelectedColor, Mode=TwoWay, Converter={StaticResource Color2BrushConverter}, RelativeSource={RelativeSource Mode=TemplatedParent}}">
                        <cc:DropdownControl.DisplayTemplate>
                            <DataTemplate>
                                <Border>
                                    <Border.Background>
                                        <ImageBrush ImageSource="/Resources/TransparentBase.png" />
                                    </Border.Background>
                                    <Rectangle Width="20" Height="14" Fill="{Binding}"/>
                                </Border>
                            </DataTemplate>
                        </cc:DropdownControl.DisplayTemplate>
                        <cc:DropdownControl.DropdownHeader>
                            <TextBlock Margin="0,0" Text="{TemplateBinding Description}" Foreground="{StaticResource Blue500}" FontWeight="Normal" FontSize="12"  />
                        </cc:DropdownControl.DropdownHeader>
                        <cc:DropdownControl.Content>
                            <Viewbox Stretch="UniformToFill" MaxHeight="300" MaxWidth="320">
                                <cc:MyBasicColorPickerPart FontSize="16" x:Name="basicColorPicker" Background="White" Foreground="{StaticResource Grey700}" SelectedColor="{Binding SelectedColor, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" />
                            </Viewbox>
                        </cc:DropdownControl.Content>
                    </cc:DropdownControl>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
