<ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        xmlns:c="http://schemas.telerik.com/2008/xaml/compile"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="c"
        xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
        xmlns:sys="clr-namespace:System;assembly=mscorlib">
    <ResourceDictionary.MergedDictionaries>
        <telerik:Windows8TouchResourceDictionary/>
    </ResourceDictionary.MergedDictionaries>
    <telerik:Windows8TouchColors x:Key="Windows8TouchColors"/>
    <ControlTemplate x:Key="ValidationTooltipTemplate">
        <StackPanel Orientation="Horizontal">
            <Grid SnapsToDevicePixels="True">
                <AdornedElementPlaceholder x:Name="Holder"/>
                <Border BorderBrush="{telerik1:Windows8TouchResource ResourceKey=ValidationBrush}" BorderThickness="1"/>
            </Grid>
            <Grid MinHeight="36" Margin="2 0" SnapsToDevicePixels="True">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Path
                            Width="5"
                            Height="8"
                            Margin="0 0 -1 0"
                            Data="M4,0 L0,4 4,8Z"
                            Stretch="None"
                            StrokeThickness="0"
                            Fill="{telerik1:Windows8TouchResource ResourceKey=ValidationBrush}"
                            HorizontalAlignment="Left"
                            VerticalAlignment="Top"/>
                    <Border
                            Background="{telerik1:Windows8TouchResource ResourceKey=ValidationBrush}"
                            BorderBrush="{telerik1:Windows8TouchResource ResourceKey=ValidationBrush}"
                            BorderThickness="1"
                            Grid.Column="1"
                            Padding="1">
                        <Label
                                Foreground="{telerik1:Windows8TouchResource ResourceKey=InvertedForegroundBrush}"
                                FontSize="{telerik1:Windows8TouchResource ResourceKey=FontSizeL}"
                                FontFamily="{telerik1:Windows8TouchResource ResourceKey=FontFamily}"
                                Content="{Binding ElementName=Holder, Path=AdornedElement.(Validation.Errors).CurrentItem.ErrorContent}"/>
                    </Border>
                </Grid>
            </Grid>
        </StackPanel>
    </ControlTemplate>
    <ControlTemplate x:Key="ButtonTemplate" TargetType="Button">
        <Grid x:Name="root" SnapsToDevicePixels="True">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="hover"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="0.3" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="hover"/>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="pressed"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="root"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStatesGroup">
                    <VisualState x:Name="Unfocused"/>
                    <VisualState x:Name="Focused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="focused">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="normal" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"/>
            <Border x:Name="pressed"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{telerik1:Windows8TouchResource ResourceKey=InvertedGradientBrush}"
                    BorderBrush="Transparent"
                    Opacity="0"/>
            <Border x:Name="hover"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="Transparent"
                    BorderBrush="{telerik1:Windows8TouchResource ResourceKey=HighBrush}"
                    Opacity="0"/>
            <Border x:Name="focused"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="Transparent"
                    BorderBrush="{telerik1:Windows8TouchResource ResourceKey=AccentBrush}"
                    Visibility="Collapsed"/>
            <ContentControl
                    Margin="{TemplateBinding Padding}"
                    IsTabStop="False"
                    Content="{TemplateBinding Content}"
                    Foreground="{TemplateBinding Foreground}"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="ButtonStyle" TargetType="Button">
        <Setter Property="Template" Value="{StaticResource ButtonTemplate}"/>
        <Setter Property="Background" Value="{telerik1:Windows8TouchResource ResourceKey=MainGradientBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Windows8TouchResource ResourceKey=MediumBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Foreground" Value="{telerik1:Windows8TouchResource ResourceKey=MainForegroundBrush}"/>
        <Setter Property="FontFamily" Value="{telerik1:Windows8TouchResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Windows8TouchResource ResourceKey=FontSizeL}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="5 8"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    </Style>
    <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle}"/>
    <Style x:Key="RepeatButtonLineBaseStyle" TargetType="RepeatButton">
        <Setter Property="MinWidth" Value="15"/>
        <Setter Property="MinHeight" Value="15"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Visibility" Value="Collapsed"/>
        <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <Border x:Name="root" Background="Transparent">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Arrow"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Arrow"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Path x:Name="Arrow"
                                IsHitTestVisible="False"
                                Fill="{telerik1:Windows8TouchResource ResourceKey=InvertedBrush}"
                                Opacity="0.5"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                RenderTransformOrigin="0.5,0.5"
                                Stretch="None"
                                Width="10"
                                Height="8"
                                Data="M 0 0 L 5 8 L 10 0 Z"
                                SnapsToDevicePixels="True"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RepeatButtonLineUpStyle" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonLineBaseStyle}">
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <ScaleTransform ScaleX="1" ScaleY="-1"/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RepeatButtonLineDownStyle" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonLineBaseStyle}">
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RepeatButtonLineLeftStyle" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonLineBaseStyle}">
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform Angle="90"/>
                    <TranslateTransform/>
                </TransformGroup>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RepeatButtonLineRightStyle" TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonLineBaseStyle}">
        <Setter Property="RenderTransform">
            <Setter.Value>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform Angle="-90"/>
                    <TranslateTransform/>
                </TransformGroup>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ThumbHorizontalStyle" TargetType="Thumb">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Grid x:Name="root" Background="Transparent">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.3">
                                        <VisualTransition.GeneratedEasingFunction>
                                            <CircleEase EasingMode="EaseOut"/>
                                        </VisualTransition.GeneratedEasingFunction>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Track"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Track"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Track"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle x:Name="Track" MinHeight="15" MinWidth="30" Fill="{telerik1:Windows8TouchResource ResourceKey=InvertedBrush}" Opacity="0.2" Margin="1"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ThumbVerticalStyle" TargetType="Thumb">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Thumb">
                    <Grid x:Name="root" Background="Transparent">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.3">
                                        <VisualTransition.GeneratedEasingFunction>
                                            <CircleEase EasingMode="EaseOut"/>
                                        </VisualTransition.GeneratedEasingFunction>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Track"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Track"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Track"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Rectangle x:Name="Track" MinWidth="15" MinHeight="30" Fill="{telerik1:Windows8TouchResource ResourceKey=InvertedBrush}" Opacity="0.2" Margin="1"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="RepeatButtonBlankStyle" TargetType="RepeatButton">
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RepeatButton">
                    <Rectangle Fill="Transparent"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ScrollBarStyle" TargetType="{x:Type ScrollBar}">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="{telerik1:Windows8TouchResource ResourceKey=MediumBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollBar}">
                    <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto"/>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <RepeatButton Style="{StaticResource RepeatButtonLineUpStyle}" Content="Up" Command="{x:Static ScrollBar.LineUpCommand}"/>
                            <Track Name="PART_Track" Grid.Row="1" IsDirectionReversed="True">
                                <Track.Resources>
                                    <sys:Double x:Key="{x:Static SystemParameters.VerticalScrollBarButtonHeightKey}">56</sys:Double>
                                </Track.Resources>
                                <Track.DecreaseRepeatButton>
                                    <RepeatButton Style="{StaticResource RepeatButtonBlankStyle}" Command="{x:Static ScrollBar.PageUpCommand}"/>
                                </Track.DecreaseRepeatButton>
                                <Track.IncreaseRepeatButton>
                                    <RepeatButton Style="{StaticResource RepeatButtonBlankStyle}" Command="{x:Static ScrollBar.PageDownCommand}"/>
                                </Track.IncreaseRepeatButton>
                                <Track.Thumb>
                                    <Thumb Style="{StaticResource ThumbVerticalStyle}" MinHeight="30"/>
                                </Track.Thumb>
                            </Track>
                            <RepeatButton Style="{StaticResource RepeatButtonLineDownStyle}" Grid.Row="2" Command="{x:Static ScrollBar.LineDownCommand}"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="Orientation" Value="Horizontal">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type ScrollBar}">
                            <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto"/>
                                        <ColumnDefinition Width="*"/>
                                        <ColumnDefinition Width="Auto"/>
                                    </Grid.ColumnDefinitions>
                                    <RepeatButton Style="{StaticResource RepeatButtonLineLeftStyle}" Command="{x:Static ScrollBar.LineLeftCommand}"/>
                                    <Track Name="PART_Track" Grid.Column="1" Orientation="Horizontal">
                                        <Track.Resources>
                                            <sys:Double x:Key="{x:Static SystemParameters.HorizontalScrollBarButtonWidthKey}">56</sys:Double>
                                        </Track.Resources>
                                        <Track.DecreaseRepeatButton>
                                            <RepeatButton Style="{StaticResource RepeatButtonBlankStyle}" Command="{x:Static ScrollBar.PageLeftCommand}"/>
                                        </Track.DecreaseRepeatButton>
                                        <Track.IncreaseRepeatButton>
                                            <RepeatButton Style="{StaticResource RepeatButtonBlankStyle}" Command="{x:Static ScrollBar.PageRightCommand}"/>
                                        </Track.IncreaseRepeatButton>
                                        <Track.Thumb>
                                            <Thumb Style="{StaticResource ThumbHorizontalStyle}" MinWidth="30"/>
                                        </Track.Thumb>
                                    </Track>
                                    <RepeatButton Style="{StaticResource RepeatButtonLineRightStyle}" Grid.Column="2" Command="{x:Static ScrollBar.LineRightCommand}"/>
                                </Grid>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>
    <Style x:Key="ScrollViewerStyle" TargetType="{x:Type ScrollViewer}">
        <Setter Property="Background" Value="{telerik1:Windows8TouchResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Windows8TouchResource ResourceKey=MediumBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Padding" Value="0"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ScrollViewer}">
                    <Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                            </Grid.RowDefinitions>
                            <ScrollContentPresenter x:Name="PART_ScrollContentPresenter"
                                    CanContentScroll="{TemplateBinding CanContentScroll}"
                                    CanHorizontallyScroll="False"
                                    CanVerticallyScroll="False"
                                    ContentTemplate="{TemplateBinding ContentTemplate}"
                                    Content="{TemplateBinding Content}"
                                    Grid.Column="0"
                                    Margin="{TemplateBinding Padding}"
                                    Grid.Row="0"/>
                            <ScrollBar x:Name="PART_VerticalScrollBar"
                                    AutomationProperties.AutomationId="VerticalScrollBar"
                                    Cursor="Arrow"
                                    Grid.Column="1"
                                    Maximum="{TemplateBinding ScrollableHeight}"
                                    Minimum="0"
                                    Grid.Row="0"
                                    Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"
                                    Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
                                    ViewportSize="{TemplateBinding ViewportHeight}"/>
                            <ScrollBar x:Name="PART_HorizontalScrollBar"
                                    AutomationProperties.AutomationId="HorizontalScrollBar"
                                    Cursor="Arrow"
                                    Grid.Column="0"
                                    Maximum="{TemplateBinding ScrollableWidth}"
                                    Minimum="0"
                                    Orientation="Horizontal"
                                    Grid.Row="1"
                                    Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"
                                    Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
                                    ViewportSize="{TemplateBinding ViewportWidth}"/>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style BasedOn="{StaticResource ScrollBarStyle}" TargetType="ScrollBar"/>
    <Style BasedOn="{StaticResource ScrollViewerStyle}" TargetType="ScrollViewer"/>
    <Style x:Key="CheckBoxStyle" TargetType="CheckBox">
        <Setter Property="Background" Value="{telerik1:Windows8TouchResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Windows8TouchResource ResourceKey=MediumBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Foreground" Value="{telerik1:Windows8TouchResource ResourceKey=MainForegroundBrush}"/>
        <Setter Property="FontSize" Value="{telerik1:Windows8TouchResource ResourceKey=FontSizeL}"/>
        <Setter Property="FontFamily" Value="{telerik1:Windows8TouchResource ResourceKey=FontFamily}"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="5 8"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Validation.ErrorTemplate">
            <Setter.Value>
                <ControlTemplate>
                    <Grid VerticalAlignment="Center" HorizontalAlignment="Left">
                        <Border Background="Transparent" HorizontalAlignment="Right" VerticalAlignment="Center"/>
                        <AdornedElementPlaceholder x:Name="Holder"/>
                        <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
                            <Border x:Name="normal"
                                    Width="24"
                                    Height="24"
                                    BorderBrush="{telerik1:Windows8TouchResource ResourceKey=ValidationBrush}"
                                    BorderThickness="2"
                                    HorizontalAlignment="Left"
                                    Margin="10 0 0 0"
                                    SnapsToDevicePixels="True"/>
                            <Grid Margin="2 0" SnapsToDevicePixels="True">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition/>
                                    <ColumnDefinition/>
                                </Grid.ColumnDefinitions>
                                <Path
                                        Width="5"
                                        Height="8"
                                        Margin="0 0 -1 0"
                                        Data="M4,0 L0,4 4,8Z"
                                        Stretch="None"
                                        StrokeThickness="0"
                                        Fill="{telerik1:Windows8TouchResource ResourceKey=ValidationBrush}"
                                        HorizontalAlignment="Left"
                                        VerticalAlignment="Top"/>
                                <Border
                                        Background="{telerik1:Windows8TouchResource ResourceKey=ValidationBrush}"
                                        BorderBrush="{telerik1:Windows8TouchResource ResourceKey=ValidationBrush}"
                                        BorderThickness="1"
                                        Grid.Column="1"
                                        Padding="1">
                                    <Label
                                            Foreground="{telerik1:Windows8TouchResource ResourceKey=InvertedForegroundBrush}"
                                            FontSize="{telerik1:Windows8TouchResource ResourceKey=FontSizeL}"
                                            FontFamily="{telerik1:Windows8TouchResource ResourceKey=FontFamily}"
                                            Content="{Binding ElementName=Holder, Path=AdornedElement.(Validation.Errors).CurrentItem.ErrorContent}"/>
                                </Border>
                            </Grid>
                        </StackPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="CheckBox">
                    <Grid x:Name="root" Background="Transparent" UseLayoutRounding="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.3">
                                        <VisualTransition.GeneratedEasingFunction>
                                            <CircleEase EasingMode="EaseOut"/>
                                        </VisualTransition.GeneratedEasingFunction>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="hover"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="pressed"/>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="bgr"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="root"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.3">
                                        <VisualTransition.GeneratedEasingFunction>
                                            <CircleEase EasingMode="EaseOut"/>
                                        </VisualTransition.GeneratedEasingFunction>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unchecked"/>
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="checked" Storyboard.TargetProperty="(UIElement.Opacity)"/>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="checkMark" Storyboard.TargetProperty="(UIElement.Opacity)"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Indeterminate">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="checked" Storyboard.TargetProperty="(UIElement.Opacity)"/>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="indeterminateMark" Storyboard.TargetProperty="(UIElement.Opacity)"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Unfocused"/>
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="focused">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Border x:Name="bgr" Grid.ColumnSpan="2" BorderThickness="0" BorderBrush="Transparent" Background="{telerik1:Windows8TouchResource ResourceKey=LowBrush}" Opacity="0"/>
                        <Grid VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10 0 0 0">
                            <Rectangle x:Name="normal" Width="24" Height="24" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="2" Fill="{TemplateBinding Background}"/>
                            <Rectangle x:Name="hover" Width="24" Height="24" Stroke="{telerik1:Windows8TouchResource ResourceKey=AccentBrush}" StrokeThickness="2" Fill="Transparent" Opacity="0"/>
                            <Rectangle x:Name="pressed" Width="24" Height="24" Stroke="Transparent" StrokeThickness="2" Fill="{telerik1:Windows8TouchResource ResourceKey=AccentBrush}" Opacity="0"/>
                            <Rectangle x:Name="checked" Width="24" Height="24" Stroke="Transparent" StrokeThickness="2" Fill="{telerik1:Windows8TouchResource ResourceKey=AccentBrush}" Opacity="0"/>
                            <Rectangle x:Name="focused"
                                    Width="24"
                                    Height="24"
                                    Stroke="{telerik1:Windows8TouchResource ResourceKey=AccentBrush}"
                                    StrokeThickness="2"
                                    Fill="Transparent"
                                    Visibility="Collapsed"/>
                            <Path x:Name="checkMark"
                                    FlowDirection="LeftToRight"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Data="M0,5.1L2.1,3L6,6.6L11.8,0L14,2L6,11z"
                                    Fill="{telerik1:Windows8TouchResource ResourceKey=InvertedForegroundBrush}"
                                    Stretch="None"
                                    Opacity="0"/>
                            <Rectangle x:Name="indeterminateMark"
                                    FlowDirection="LeftToRight"
                                    Fill="{telerik1:Windows8TouchResource ResourceKey=InvertedForegroundBrush}"
                                    Width="12"
                                    Height="3"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Opacity="0"/>
                        </Grid>
                        <ContentPresenter x:Name="Content"
                                Margin="{TemplateBinding Padding}"
                                RecognizesAccessKey="True"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                Grid.Column="1"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="CheckBox" BasedOn="{StaticResource CheckBoxStyle}"/>
    <Style x:Key="TextBoxStyle" TargetType="TextBox">
        <Setter Property="Background" Value="{telerik1:Windows8TouchResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Windows8TouchResource ResourceKey=MediumBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Foreground" Value="{telerik1:Windows8TouchResource ResourceKey=MainForegroundBrush}"/>
        <Setter Property="FontFamily" Value="{telerik1:Windows8TouchResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Windows8TouchResource ResourceKey=FontSizeL}"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="5 7"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTooltipTemplate}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TextBox">
                    <Grid x:Name="root" UseLayoutRounding="True" SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" Storyboard.TargetName="hover" Storyboard.TargetProperty="Opacity" To="1"/>
                                        </Storyboard>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="root" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ReadOnly">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="normal" Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="Transparent"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0:0:0" Storyboard.TargetName="normal" Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="Transparent"/>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="focused">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="normal" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                            <ScrollViewer x:Name="PART_ContentHost"
                                    Padding="{TemplateBinding Padding}"
                                    Foreground="{TemplateBinding Foreground}"
                                    BorderThickness="0"
                                    Background="Transparent"
                                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"/>
                        </Border>
                        <Border x:Name="hover"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="Transparent"
                                BorderBrush="{telerik1:Windows8TouchResource ResourceKey=HighBrush}"
                                Opacity="0"
                                IsHitTestVisible="False"/>
                        <Border x:Name="focused"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="Transparent"
                                BorderBrush="{telerik1:Windows8TouchResource ResourceKey=AccentBrush}"
                                Visibility="Collapsed"
                                IsHitTestVisible="False"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="TextBox" BasedOn="{StaticResource TextBoxStyle}"/>
    <Style x:Key="RadioButtonStyle" TargetType="RadioButton">
        <Setter Property="Background" Value="{telerik1:Windows8TouchResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Windows8TouchResource ResourceKey=MediumBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Foreground" Value="{telerik1:Windows8TouchResource ResourceKey=MainForegroundBrush}"/>
        <Setter Property="FontSize" Value="{telerik1:Windows8TouchResource ResourceKey=FontSizeL}"/>
        <Setter Property="FontFamily" Value="{telerik1:Windows8TouchResource ResourceKey=FontFamily}"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="5 8"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="RadioButton">
                    <Grid x:Name="root" Background="Transparent">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.3">
                                        <VisualTransition.GeneratedEasingFunction>
                                            <CircleEase EasingMode="EaseOut"/>
                                        </VisualTransition.GeneratedEasingFunction>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="hover"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="pressed"/>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="bgr"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="root"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0:0:0.3">
                                        <VisualTransition.GeneratedEasingFunction>
                                            <CircleEase EasingMode="EaseOut"/>
                                        </VisualTransition.GeneratedEasingFunction>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Unchecked"/>
                                <VisualState x:Name="Checked">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="checked" Storyboard.TargetProperty="(UIElement.Opacity)"/>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="checkMark" Storyboard.TargetProperty="(UIElement.Opacity)"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Indeterminate">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetName="IndeterminateIcon" Storyboard.TargetProperty="(UIElement.Opacity)"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Unfocused"/>
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="focused">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <Border x:Name="bgr" Grid.ColumnSpan="2" BorderThickness="0" BorderBrush="Transparent" Background="{telerik1:Windows8TouchResource ResourceKey=LowBrush}" Opacity="0"/>
                        <Grid VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10 0 0 0">
                            <Ellipse x:Name="normal" Width="24" Height="24" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="2" Fill="{TemplateBinding Background}"/>
                            <Ellipse x:Name="hover" Width="24" Height="24" Stroke="{telerik1:Windows8TouchResource ResourceKey=AccentBrush}" StrokeThickness="2" Fill="Transparent" Opacity="0"/>
                            <Ellipse x:Name="pressed" Width="24" Height="24" Stroke="Transparent" StrokeThickness="2" Fill="{telerik1:Windows8TouchResource ResourceKey=AccentBrush}" Opacity="0"/>
                            <Ellipse x:Name="checked" Width="24" Height="24" Stroke="Transparent" StrokeThickness="2" Fill="{telerik1:Windows8TouchResource ResourceKey=AccentBrush}" Opacity="0"/>
                            <Ellipse x:Name="IndeterminateIcon"
                                    Width="10"
                                    Height="10"
                                    Fill="{telerik1:Windows8TouchResource ResourceKey=LowBrush}"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Opacity="0"/>
                            <Ellipse x:Name="focused"
                                    Width="24"
                                    Height="24"
                                    Stroke="{telerik1:Windows8TouchResource ResourceKey=AccentBrush}"
                                    StrokeThickness="2"
                                    Fill="Transparent"
                                    Visibility="Collapsed"/>
                            <Ellipse x:Name="checkMark"
                                    Width="10"
                                    Height="10"
                                    StrokeThickness="1"
                                    Fill="{telerik1:Windows8TouchResource ResourceKey=MainBrush}"
                                    Opacity="0"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"/>
                        </Grid>
                        <ContentPresenter x:Name="Content"
                                Margin="{TemplateBinding Padding}"
                                RecognizesAccessKey="True"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                Grid.Column="1"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="RadioButton" BasedOn="{StaticResource RadioButtonStyle}"/>
    <Style x:Key="ListBoxItemStyle" TargetType="ListBoxItem">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="BorderBrush" Value="Transparent"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Foreground" Value="{telerik1:Windows8TouchResource ResourceKey=MainForegroundBrush}"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Margin" Value="0 1"/>
        <Setter Property="Padding" Value="5 8"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBoxItem">
                    <Grid x:Name="root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.05" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="hover"/>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="root"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualState x:Name="Unselected"/>
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="selected"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="focused">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="normal" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
                        <Border x:Name="hover"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{telerik1:Windows8TouchResource ResourceKey=InvertedBrush}"
                                Opacity="0"/>
                        <Border x:Name="selected"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{telerik1:Windows8TouchResource ResourceKey=LowBrush}"
                                Opacity="0"/>
                        <Border x:Name="focused"
                                BorderBrush="{telerik1:Windows8TouchResource ResourceKey=HighBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="Transparent"
                                Visibility="Collapsed"/>
                        <ContentControl x:Name="contentPresenter"
                                Margin="{TemplateBinding Padding}"
                                IsTabStop="False"
                                Foreground="{TemplateBinding Foreground}"
                                FocusVisualStyle="{x:Null}"
                                ContentTemplate="{TemplateBinding ContentTemplate}"
                                Content="{TemplateBinding Content}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
                                ContentStringFormat="{TemplateBinding ContentStringFormat}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style x:Key="ListBoxStyle" TargetType="ListBox">
        <Setter Property="Background" Value="{telerik1:Windows8TouchResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Windows8TouchResource ResourceKey=MediumBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Foreground" Value="{telerik1:Windows8TouchResource ResourceKey=MainForegroundBrush}"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Top"/>
        <Setter Property="IsTabStop" Value="False"/>
        <Setter Property="Padding" Value="2 1"/>
        <Setter Property="FontFamily" Value="{telerik1:Windows8TouchResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Windows8TouchResource ResourceKey=FontSizeL}"/>
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
        <Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListBox">
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                        <ScrollViewer x:Name="ScrollViewer"
                                Padding="{TemplateBinding Padding}"
                                ScrollViewer.HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                                ScrollViewer.VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                                Background="{TemplateBinding Background}"
                                BorderThickness="0">
                            <ItemsPresenter/>
                        </ScrollViewer>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="ListBox" BasedOn="{StaticResource ListBoxStyle}"/>
    <Style TargetType="ListBoxItem" BasedOn="{StaticResource ListBoxItemStyle}"/>
    <Style x:Key="PasswordBoxStyle" TargetType="PasswordBox">
        <Setter Property="Background" Value="{telerik1:Windows8TouchResource ResourceKey=MainBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Windows8TouchResource ResourceKey=MediumBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Foreground" Value="{telerik1:Windows8TouchResource ResourceKey=MainForegroundBrush}"/>
        <Setter Property="FontFamily" Value="{telerik1:Windows8TouchResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Windows8TouchResource ResourceKey=FontSizeL}"/>
        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="5 7"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationTooltipTemplate}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="PasswordBox">
                    <Grid x:Name="root" UseLayoutRounding="True" SnapsToDevicePixels="True">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal"/>
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <Storyboard>
                                            <DoubleAnimation Duration="0" Storyboard.TargetName="hover" Storyboard.TargetProperty="Opacity" To="1"/>
                                        </Storyboard>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" Storyboard.TargetName="root" Storyboard.TargetProperty="Opacity" To="0.5"/>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="focused">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused"/>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="normal" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                            <ScrollViewer x:Name="PART_ContentHost"
                                    Padding="{TemplateBinding Padding}"
                                    Foreground="{TemplateBinding Foreground}"
                                    BorderThickness="0"
                                    Background="Transparent"
                                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"/>
                        </Border>
                        <Border x:Name="hover"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="Transparent"
                                BorderBrush="{telerik1:Windows8TouchResource ResourceKey=HighBrush}"
                                Opacity="0"
                                IsHitTestVisible="False"/>
                        <Border x:Name="focused"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="Transparent"
                                BorderBrush="{telerik1:Windows8TouchResource ResourceKey=AccentBrush}"
                                Visibility="Collapsed"
                                IsHitTestVisible="False"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="PasswordBox" BasedOn="{StaticResource PasswordBoxStyle}"/>
    <ControlTemplate x:Key="RepeatButton_Template" TargetType="RepeatButton">
        <Grid x:Name="root">
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="CommonStates">
                    <VisualState x:Name="Normal"/>
                    <VisualState x:Name="MouseOver">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="hover"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Pressed">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="0.3" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="hover"/>
                            <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="pressed"/>
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Disabled">
                        <Storyboard>
                            <DoubleAnimation Duration="0" To="0.5" Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="root"/>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
                <VisualStateGroup x:Name="FocusStatesGroup">
                    <VisualState x:Name="Unfocused"/>
                    <VisualState x:Name="Focused">
                        <Storyboard>
                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="focused">
                                <DiscreteObjectKeyFrame KeyTime="0">
                                    <DiscreteObjectKeyFrame.Value>
                                        <Visibility>Visible</Visibility>
                                    </DiscreteObjectKeyFrame.Value>
                                </DiscreteObjectKeyFrame>
                            </ObjectAnimationUsingKeyFrames>
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border x:Name="normal" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"/>
            <Border x:Name="pressed"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="{telerik1:Windows8TouchResource ResourceKey=InvertedGradientBrush}"
                    BorderBrush="Transparent"
                    Opacity="0"/>
            <Border x:Name="hover"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="Transparent"
                    BorderBrush="{telerik1:Windows8TouchResource ResourceKey=HighBrush}"
                    Opacity="0"/>
            <Border x:Name="focused"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Background="Transparent"
                    BorderBrush="{telerik1:Windows8TouchResource ResourceKey=AccentBrush}"
                    Visibility="Collapsed"/>
            <ContentControl
                    Margin="{TemplateBinding Padding}"
                    IsTabStop="False"
                    Content="{TemplateBinding Content}"
                    Foreground="{TemplateBinding Foreground}"
                    ContentTemplate="{TemplateBinding ContentTemplate}"
                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                    ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"/>
        </Grid>
    </ControlTemplate>
    <Style x:Key="RepeatButtonStyle" TargetType="RepeatButton">
        <Setter Property="Template" Value="{StaticResource RepeatButton_Template}"/>
        <Setter Property="Background" Value="{telerik1:Windows8TouchResource ResourceKey=MainGradientBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Windows8TouchResource ResourceKey=MediumBrush}"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Foreground" Value="{telerik1:Windows8TouchResource ResourceKey=MainForegroundBrush}"/>
        <Setter Property="FontFamily" Value="{telerik1:Windows8TouchResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Windows8TouchResource ResourceKey=FontSizeL}"/>
        <Setter Property="HorizontalContentAlignment" Value="Center"/>
        <Setter Property="VerticalContentAlignment" Value="Center"/>
        <Setter Property="Padding" Value="3 8"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
    </Style>
    <Style TargetType="RepeatButton" BasedOn="{StaticResource RepeatButtonStyle}"/>
    <Style x:Key="ToolTipStyle" TargetType="ToolTip">
        <Setter Property="Background" Value="{telerik1:Windows8TouchResource ResourceKey=InvertedBrush}"/>
        <Setter Property="BorderBrush" Value="{telerik1:Windows8TouchResource ResourceKey=MainBrush}"/>
        <Setter Property="Foreground" Value="{telerik1:Windows8TouchResource ResourceKey=InvertedForegroundBrush}"/>
        <Setter Property="Padding" Value="8 7"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="FontFamily" Value="{telerik1:Windows8TouchResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Windows8TouchResource ResourceKey=FontSizeL}"/>
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="UseLayoutRounding" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToolTip">
                    <Grid>
                        <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
                            <ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="ToolTip" BasedOn="{StaticResource ToolTipStyle}"/>

    <!-- Style for Separator which is not child of StatusBar (horizontal one) -->
    <Style x:Key="SeparatorStyle" TargetType="Separator">
        <Setter Property="Background" Value="{telerik1:Windows8TouchResource ResourceKey=MediumBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="MinHeight" Value="1"/>
        <Setter Property="Margin" Value="0 2"/>
        <Setter Property="Focusable" Value="False"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Separator">
                    <Border
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Background="{TemplateBinding Background}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Style for Separator which is child of StatusBar (vertical one) -->
    <Style x:Key="{x:Static StatusBar.SeparatorStyleKey}" TargetType="Separator">
        <Setter Property="OverridesDefaultStyle" Value="True"/>
        <Setter Property="Background" Value="{telerik1:Windows8TouchResource ResourceKey=MediumBrush}"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="MinWidth" Value="1"/>
        <Setter Property="Margin" Value="3 2"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="VerticalAlignment" Value="Stretch"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Separator">
                    <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"/>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- Style for StatusBarItem -->
    <Style x:Key="StatusBarItemStyle" TargetType="StatusBarItem">
        <Setter Property="Background" Value="{x:Null}"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="HorizontalContentAlignment" Value="Left"/>
        <Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="StatusBarItem">
                    <Border
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Background="{TemplateBinding Background}"
                            SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                        <ContentPresenter x:Name="contentPresenter"
                                SnapsToDevicePixels="true"
                                Margin="{TemplateBinding Padding}"
                                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Resources>
            <Style TargetType="Separator" BasedOn="{StaticResource {x:Static StatusBar.SeparatorStyleKey}}">
                <Setter Property="Margin" Value="3 -1"/>
            </Style>
        </Style.Resources>
    </Style>

    <!-- Style for StatusBar -->
    <Style x:Key="StatusBarStyle" TargetType="StatusBar">
        <Setter Property="SnapsToDevicePixels" Value="True"/>
        <Setter Property="VerticalAlignment" Value="Bottom"/>
        <Setter Property="BorderThickness" Value="0 1 0 0"/>
        <Setter Property="BorderBrush" Value="{telerik1:Windows8TouchResource ResourceKey=MediumBrush}"/>
        <Setter Property="Background" Value="{telerik1:Windows8TouchResource ResourceKey=LowBrush}"/>
        <Setter Property="Foreground" Value="{telerik1:Windows8TouchResource ResourceKey=MainForegroundBrush}"/>
        <Setter Property="FontFamily" Value="{telerik1:Windows8TouchResource ResourceKey=FontFamily}"/>
        <Setter Property="FontSize" Value="{telerik1:Windows8TouchResource ResourceKey=FontSizeL}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="StatusBar">
                    <Grid>
                        <Border
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                        <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Style.Resources>
            <Style TargetType="Separator" BasedOn="{StaticResource {x:Static StatusBar.SeparatorStyleKey}}"/>
        </Style.Resources>
    </Style>
    <Style TargetType="StatusBar" BasedOn="{StaticResource StatusBarStyle}"/>
    <Style TargetType="StatusBarItem" BasedOn="{StaticResource StatusBarItemStyle}"/>
    <Style TargetType="Separator" BasedOn="{StaticResource SeparatorStyle}"/>
</ResourceDictionary>
