<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:theming="using:Telerik.UI.Xaml.Controls"
    xmlns:local="using:Telerik.UI.Xaml.Controls.Input"
    xmlns:localAutoComplete="using:Telerik.UI.Xaml.Controls.Input.AutoCompleteBox"
    xmlns:localDateTime="using:Telerik.UI.Xaml.Controls.Input.DateTimePickers"
    xmlns:primitives="using:Telerik.UI.Xaml.Controls.Primitives"
    xmlns:primitivesCommon="using:Telerik.UI.Xaml.Controls.Primitives.Common"
    xmlns:primitivesLoopingList="using:Telerik.UI.Xaml.Controls.Primitives.LoopingList"
         xmlns:telerik="using:Telerik.UI.Xaml.Controls"
    xmlns:localNumericBox="using:Telerik.UI.Xaml.Controls.Input.NumericBox">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary>
            <telerik:UserThemeResources x:Key="ResourceLoaderInitializer" />
        </ResourceDictionary>
        <ResourceDictionary Source="ms-appx:///Telerik.UI.Xaml.Input.UWP/Themes/Resources.xaml" />
        <ResourceDictionary Source="ms-appx:///Telerik.UI.Xaml.Input.UWP/Themes/Calendar.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <primitives:ContentToVisibilityConverter x:Key="ContentToVisibilityConverter" />

    <!--#region SegmentedControl-->

    <Style TargetType="local:SegmentedItemsControl">
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <local:SegmentedPanel />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:SegmentedItemsControl">
                    <Grid BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" CornerRadius="{TemplateBinding CornerRadius}">
                        <Canvas x:Name="PART_DecorationLayer" />
                        <ItemsPresenter />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:RadSegmentedControl">
        <Setter Property="BorderBrush" Value="{ThemeResource TelerikSegmentedControlBorderThemeBrush}" />
        <Setter Property="Background" Value="{ThemeResource TelerikSegmentedControlBackgroundThemeBrush}" />
        <Setter Property="BorderThickness" Value="2" />
        <Setter Property="CornerRadius" Value="0" />
        <Setter Property="MinHeight" Value="48" />
        <Setter Property="SeparatorWidth" Value="2" />
        <Setter Property="SeparatorBrush" Value="{ThemeResource TelerikSegmentedControlSeparatorThemeBrush}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:RadSegmentedControl">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="PART_ItemsPanel">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikSegmentedControlDisabledBorderThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="PART_ItemsPanel">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikSegmentedControlDisabledBackgroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="SeparatorBrush" Storyboard.TargetName="PART_ItemsPanel">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikSegmentedControlDisabledSeparatorThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Canvas x:Name="PART_AnimationLayer" />
                        <local:SegmentedItemsControl x:Name="PART_ItemsPanel"
                                                     ItemContainerStyle="{TemplateBinding ItemContainerStyle}"
                                                     ItemContainerStyleSelector="{TemplateBinding ItemContainerStyleSelector}"
                                                     ItemTemplate="{TemplateBinding ItemTemplate}"
                                                     ItemTemplateSelector="{TemplateBinding ItemTemplateSelector}"
                                                     SegmentWidthMode="{TemplateBinding SegmentWidthMode}"
                                                     CornerRadius="{TemplateBinding CornerRadius}"
                                                     BorderBrush="{TemplateBinding BorderBrush}"
                                                     Background="{TemplateBinding Background}"
                                                     BorderThickness="{TemplateBinding BorderThickness}"
                                                     SeparatorWidth="{TemplateBinding SeparatorWidth}"
                                                     SeparatorBrush="{TemplateBinding SeparatorBrush}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:Segment">
        <Setter Property="Background" Value="{ThemeResource TelerikSegmentBackgroundThemeBrush}" />
        <Setter Property="Foreground" Value="{ThemeResource TelerikSegmentContentForegroundThemeBrush}" />
        <Setter Property="SelectedForeground" Value="{ThemeResource TelerikSegmentSelectedContentForegroundThemeBrush}" />
        <Setter Property="SelectedBackground" Value="{ThemeResource TelerikSegmentSelectedBackgroundThemeBrush}" />
        <Setter Property="DisabledForeground" Value="{ThemeResource TelerikSegmentDisabledContentForegroundThemeBrush}" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="BorderBrush" Value="{ThemeResource TelerikSegmentBorderThemeBrush}" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="VerticalAlignment" Value="Stretch" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
        <Setter Property="FontSize" Value="15" />
        <Setter Property="CornerRadius" Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:Segment">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="PointerOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="border">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding Background, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding BorderBrush, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="contentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding Foreground, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="border">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding Background, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding BorderBrush, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="contentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding Foreground, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="border">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding Background, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding BorderBrush, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="contentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding DisabledForeground, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Selected">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="border">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SelectedBackground, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding BorderBrush, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="contentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SelectedForeground, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="SelectedPointerOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="border">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SelectedBackground, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding BorderBrush, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="contentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SelectedForeground, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="SelectedPressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="border">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SelectedBackground, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding BorderBrush, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="contentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SelectedForeground, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="SelectedDisabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="border">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding SelectedBackground, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="border">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding BorderBrush, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="contentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding DisabledForeground, RelativeSource={RelativeSource Mode=TemplatedParent}}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualWhite" />
                                        <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisualBlack" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                                <VisualState x:Name="PointerFocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Border BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="{TemplateBinding CornerRadius}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                x:Name="border"
                                VerticalAlignment="Stretch"
                                HorizontalAlignment="Stretch">
                        </Border>

                        <ContentPresenter x:Name="contentPresenter" AutomationProperties.AccessibilityView="Raw"
                                          ContentTemplate="{TemplateBinding ContentTemplate}"
                                          ContentTransitions="{TemplateBinding ContentTransitions}"
                                          Content="{TemplateBinding Content}"
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          Margin="{TemplateBinding Padding}" />
                        <Rectangle x:Name="FocusVisualWhite" Opacity="0" StrokeDashOffset="1.5" StrokeEndLineCap="Square"
                                           Stroke="{ThemeResource FocusVisualWhiteStrokeThemeBrush}" StrokeDashArray="1,1" />
                        <Rectangle x:Name="FocusVisualBlack" Opacity="0" StrokeDashOffset="0.5" StrokeEndLineCap="Square"
                                           Stroke="{ThemeResource FocusVisualBlackStrokeThemeBrush}" StrokeDashArray="1,1" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--#endregion-->

    <!-- #region Rating-->
    <Style TargetType="ContentPresenter" x:Key="RatingIconStyle">
        <Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="FontSize" Value="30" />
    </Style>

    <Style TargetType="ContentPresenter" x:Key="EmptyIconStyle" BasedOn="{StaticResource RatingIconStyle}">
        <Setter Property="Foreground" Value="Gray" />
    </Style>

    <Style TargetType="ContentPresenter" x:Key="FilledIconStyle" BasedOn="{StaticResource RatingIconStyle}">
        <Setter Property="Foreground" Value="{StaticResource TelerikSelectedColor}" />
    </Style>

    <Style TargetType="ContentPresenter" x:Key="HighlightedIconStyle" BasedOn="{StaticResource RatingIconStyle}">
        <Setter Property="Foreground" Value="Red" />
    </Style>

    <Style TargetType="local:RadRatingItem">
        <Setter Property="UseSystemFocusVisuals" Value="True" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:RadRatingItem">
                    <Grid x:Name="LayoutRoot" Margin="{TemplateBinding Padding}">                        
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>

                        <ContentPresenter x:Name="ContentPresenter" FontSize="15"
                                          Content="{TemplateBinding Content}"
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />

                        <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="EmptyIconContainer" Margin="0" Grid.Row="1">
                            <ContentPresenter Style="{TemplateBinding EmptyIconStyle}" AutomationProperties.AccessibilityView="Raw"
                                              Content="{TemplateBinding EmptyIconContent}"
                                              ContentTemplate="{TemplateBinding EmptyIconContentTemplate}"
                                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                              FontSize="{TemplateBinding FontSize}" />
                        </Border>

                        <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" x:Name="FilledIconContainer" Margin="0" Grid.Row="1">
                            <ContentPresenter x:Name="FilledIconPresenter" AutomationProperties.AccessibilityView="Raw"
                                              Style="{TemplateBinding FilledIconStyle}"
                                              Content="{TemplateBinding FilledIconContent}"
                                              ContentTemplate="{TemplateBinding FilledIconContentTemplate}"
                                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                              FontSize="{TemplateBinding FontSize}" />
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:RadRating">
        <Setter Property="Orientation" Value="Horizontal" />
		<Setter Property="UseSystemFocusVisuals" Value="True"/>
        <Setter Property="EmptyIconStyle" Value="{StaticResource EmptyIconStyle}" />
        <Setter Property="EmptyIconContent" Value="&#xe0b4;" />
        <Setter Property="FilledIconStyle" Value="{StaticResource FilledIconStyle}" />
        <Setter Property="FilledIconContent" Value="&#xe0b4;" />
        <Setter Property="HighlightedIconStyle" Value="{StaticResource HighlightedIconStyle}" />
        <Setter Property="FontSize" Value="30" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:RadRating">
                    <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Padding="{TemplateBinding Padding}"
                            x:Name="LayoutRoot">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="0.3" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <StackPanel Orientation="{TemplateBinding Orientation}" x:Name="Part_RatingPanel" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--#endregion-->

    <!--#region NumericBox -->

    <Style TargetType="primitivesCommon:InlineButton" x:Key="NumericBoxButtonBaseStyle">
        <Setter Property="FontFamily" Value="{ThemeResource SymbolThemeFontFamily}" />
    </Style>

    <Style TargetType="primitivesCommon:InlineButton" x:Key="NumericButtonIncreaseStyle" BasedOn="{StaticResource NumericBoxButtonBaseStyle}">
        <Setter Property="AutomationProperties.Name" Value="NumericIncrease"/>
        <Setter Property="ClickMode" Value="Press" />
        <Setter Property="Padding" Value="9,2,9,4" />
        <Setter Property="BorderThickness" Value="2" />
        <Setter Property="FontSize" Value="16" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="VerticalAlignment" Value="Stretch" />
        <Setter Property="Content" Value="&#xE0A0;" />
        <Setter Property="Background" Value="{ThemeResource TelerikNumericBoxSpinButtonBackgroundBrush}" />
        <Setter Property="Foreground" Value="{ThemeResource TelerikNumericBoxSpinButtonForegroundBrush}" />
        <Setter Property="BorderBrush" Value="{ThemeResource TelerikNumericBoxSpinButtonBackgroundBrush}" />
        <Setter Property="PointerOverBackgroundBrush" Value="{ThemeResource TelerikNumericBoxSpinButtonPointerOverBackgroundBrush}" />
        <Setter Property="PointerOverForegroundBrush" Value="{ThemeResource TelerikNumericBoxSpinButtonForegroundBrush}" />
        <Setter Property="PointerOverBorderBrush" Value="{ThemeResource TelerikNumericBoxSpinButtonPointerOverBackgroundBrush}" />
        <Setter Property="PressedBackgroundBrush" Value="{ThemeResource TelerikNumericBoxSpinButtonPressedBackgroundBrush}" />
        <Setter Property="PressedForegroundBrush" Value="{ThemeResource TelerikNumericBoxSpinButtonPressedForegroundBrush}" />
        <Setter Property="PressedBorderBrush" Value="{ThemeResource TelerikNumericBoxSpinButtonPressedBackgroundBrush}" />
        <Setter Property="DisabledBackgroundBrush" Value="{ThemeResource TelerikNumericBoxSpinButtonDisabledBackgroundBrush}" />
        <Setter Property="DisabledForegroundBrush" Value="{ThemeResource TelerikNumericBoxSpinButtonDisabledForegroundBrush}" />
        <Setter Property="DisabledBorderBrush" Value="{ThemeResource TelerikNumericBoxSpinButtonDisabledBorderBrush}" />
    </Style>

    <Style TargetType="primitivesCommon:InlineButton" x:Key="NumericButtonDecreaseStyle" BasedOn="{StaticResource NumericButtonIncreaseStyle}">
        <Setter Property="AutomationProperties.Name" Value="NumericDecrease"/>
        <Setter Property="Margin" Value="2,0" />
        <Setter Property="Content" Value="&#xE0A1;" />
    </Style>

    <Style TargetType="primitivesCommon:InlineButton" x:Key="DeleteButtonStyle" BasedOn="{StaticResource NumericBoxButtonBaseStyle}">
        <Setter Property="Content" Value="&#xE894;" />
        <Setter Property="Padding" Value="1,0,0,0" />
        <Setter Property="Foreground" Value="{ThemeResource TelerikNumericBoxDeleteButtonForegroundBrush}" />
        <Setter Property="PointerOverBackgroundBrush" Value="{ThemeResource TelerikNumericBoxDeleteButtonPointerOverBackgroundBrush}" />
        <Setter Property="PointerOverForegroundBrush" Value="{ThemeResource TelerikNumericBoxDeleteButtonForegroundBrush}" />
        <Setter Property="PressedBackgroundBrush" Value="{ThemeResource TelerikNumericBoxDeleteButtonPressedBackgroundBrush}" />
        <Setter Property="PressedForegroundBrush" Value="{ThemeResource TelerikNumericBoxDeleteButtonPressedForegroundBrush}" />
    </Style>

    <primitives:BooleanNotConverter x:Key="EditableConverter" />

    <Style TargetType="local:RadNumericBox">
        <Setter Property="Minimum" Value="0" />
        <Setter Property="Maximum" Value="100" />
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
        <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
        <Setter Property="MinWidth" Value="180" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="BorderThickness" Value="2" />
        <Setter Property="BorderBrush" Value="{ThemeResource TelerikNumericBoxBorderBrush}" />
        <Setter Property="IncreaseButtonStyle" Value="{StaticResource NumericButtonIncreaseStyle}" />
        <Setter Property="DecreaseButtonStyle" Value="{StaticResource NumericButtonDecreaseStyle}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:RadNumericBox">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="WatermarkHidden" />
                                <VisualState x:Name="WatermarkVisible">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="Watermark">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>
                        <ContentControl Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}" Style="{TemplateBinding HeaderStyle}" IsTabStop="False" Visibility="{Binding Content, RelativeSource={RelativeSource Self}, Converter={StaticResource ContentToVisibilityConverter}}" />
                        <Grid Grid.Row="1">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <localNumericBox:NumericTextBox BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" x:Name="PART_TextBox" IsReadOnly="{Binding IsEditable, Converter={StaticResource EditableConverter}, RelativeSource={RelativeSource TemplatedParent}}" />
                            <primitivesCommon:InlineButton x:Name="PART_DecreaseButton" IsRepeatingEnabled="True" Visibility="{TemplateBinding ButtonsVisibility}"
                                                           Grid.Column="1" Style="{TemplateBinding DecreaseButtonStyle}" />
                            <primitivesCommon:InlineButton x:Name="PART_IncreaseButton" IsRepeatingEnabled="True"  Visibility="{TemplateBinding ButtonsVisibility}"
                                                           Grid.Column="2" Style="{TemplateBinding IncreaseButtonStyle}" />
                        </Grid>
                        <ContentControl x:Name="Watermark" Visibility="Collapsed" IsTabStop="False" IsHitTestVisible="False" Content="{TemplateBinding Watermark}" ContentTemplate="{TemplateBinding WatermarkTemplate}"
                                        Foreground="{ThemeResource TelerikNumericBoxWatermarkForegroundBrush}" Padding="4,0,0,2" Margin="{TemplateBinding Padding}" Grid.Row="1" VerticalAlignment="Center" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="HeaderStyle">
            <Setter.Value>
                <Style TargetType="ContentControl">
                    <Setter Property="HorizontalAlignment" Value="Stretch" />
                    <Setter Property="VerticalAlignment" Value="Stretch" />
                    <Setter Property="HorizontalContentAlignment" Value="Stretch" />
                    <Setter Property="VerticalContentAlignment" Value="Stretch" />
                    <Setter Property="Margin" Value="0 0 0 4" />
                    <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
                    <Setter Property="Foreground" Value="{ThemeResource TelerikNumericBoxHeaderForegroundBrush}" />
                </Style>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="localNumericBox:NumericTextBox">
        <Setter Property="Foreground" Value="{ThemeResource TelerikNumericBoxForegroundBrush}" />
        <Setter Property="Background" Value="{ThemeResource TelerikNumericBoxBackgroundBrush}" />
        <Setter Property="BorderBrush" Value="{ThemeResource TelerikNumericBoxBorderBrush}" />
        <Setter Property="BorderThickness" Value="2" />
        <Setter Property="InputScope" Value="Number" />
        <Setter Property="MinWidth" Value="{ThemeResource TextControlThemeMinWidth}" />
        <Setter Property="MinHeight" Value="{ThemeResource TextControlThemeMinHeight}" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" />
        <Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False" />
        <Setter Property="Padding" Value="5,3" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="localNumericBox:NumericTextBox">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="BorderElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikNumericBoxDisabledBackgroundBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="BorderElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikNumericBoxDisabledBorderBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikNumericBoxDisabledForegroundBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="PointerOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="BorderElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikNumericBoxPointerOverBackgroundBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="BorderElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikNumericBoxPointerOverBorderBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="BorderElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikNumericBoxFocusedBackgroundBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="BorderElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikNumericBoxFocusedBorderBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ButtonStates">
                                <VisualState x:Name="ButtonVisible">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="DeleteButton">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ButtonCollapsed" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="BorderElement" Background="{TemplateBinding Background}" Grid.ColumnSpan="2" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" />
                        <ScrollViewer x:Name="ContentElement"
                                      AutomationProperties.AccessibilityView="Raw"
                                      HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
                                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                                      IsTabStop="False"
                                      IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}"
                                      IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}"
                                      IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
                                      Margin="{TemplateBinding BorderThickness}"
                                      Padding="{TemplateBinding Padding}"
                                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                                      VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}"
                                      ZoomMode="Disabled" />
                        <primitivesCommon:InlineButton x:Name="DeleteButton" Grid.Column="1" FontSize="{TemplateBinding FontSize}" IsTabStop="False"
                                                       Style="{StaticResource DeleteButtonStyle}" Visibility="Collapsed" VerticalAlignment="Stretch" Margin="2" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--#endregion-->

    <!--#region AutoComlpeteBox-->

    <Style TargetType="localAutoComplete:AutoCompleteTextBox"  BasedOn="{StaticResource AutoCompleteTextBoxStyle}">
        <Setter Property="IsTextPredictionEnabled" Value="False" />
        <Setter Property="MinWidth" Value="{ThemeResource TextControlThemeMinWidth}" />
        <Setter Property="MinHeight" Value="{ThemeResource TextControlThemeMinHeight}" />
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" />
        <Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False" />
        <Setter Property="Padding" Value="5,3" />
        <Setter Property="Template" Value="{StaticResource AutoCompleteTextBoxTemplate}" />
    </Style>

    <Style TargetType="localAutoComplete:SuggestionItem" BasedOn="{StaticResource SuggestionItemStyle}">
        <Setter Property="BorderBrush" Value="{ThemeResource TelerikAutoCompleteBoxSelectorItemBorderBrush}" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="TabNavigation" Value="Local" />
        <Setter Property="Padding" Value="8,8" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="localAutoComplete:SuggestionItem">
                    <Border x:Name="RootElement" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="PointerOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="RootElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikAutoCompleteBoxSelectorSelectedItemBackgroundBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikAutoCompleteBoxFocusedForegroundBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="RootElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikAutoCompleteBoxSelectorSelectedItemBorderBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled" />
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="RootElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikAutoCompleteBoxSelectorSelectedItemBackgroundBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikAutoCompleteBoxFocusedForegroundBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="RootElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikAutoCompleteBoxSelectorSelectedItemBorderBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="SelectionStates">
                                <VisualState x:Name="Unselected" />
                                <VisualState x:Name="Selected" />
                                <VisualState x:Name="SelectedUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="RootElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikAutoCompleteBoxSelectorSelectedItemBackgroundBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikAutoCompleteBoxFocusedForegroundBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="RootElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikAutoCompleteBoxSelectorSelectedItemBorderBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="SelectedDisabled" />
                                <VisualState x:Name="SelectedPointerOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="RootElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikAutoCompleteBoxSelectorSelectedItemBackgroundBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikAutoCompleteBoxFocusedForegroundBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="RootElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikAutoCompleteBoxSelectorSelectedItemBorderBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="SelectedPressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="RootElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikAutoCompleteBoxSelectorSelectedItemBackgroundBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikAutoCompleteBoxFocusedForegroundBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="RootElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikAutoCompleteBoxSelectorSelectedItemBorderBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused" />
                                <VisualState x:Name="Unfocused" />
                                <VisualState x:Name="PointerFocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ContentPresenter x:Name="ContentPresenter"
                                          ContentTemplate="{TemplateBinding ContentTemplate}"
                                          ContentTransitions="{TemplateBinding ContentTransitions}"
                                          Content="{TemplateBinding Content}"
                                          HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                          VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                          Margin="{TemplateBinding Padding}" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="localAutoComplete:SuggestionItemsControl" BasedOn="{StaticResource SuggestionItemsControlStyle}">
        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
        <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Disabled" />
        <Setter Property="ScrollViewer.IsHorizontalRailEnabled" Value="True" />
        <Setter Property="ScrollViewer.VerticalScrollMode" Value="Enabled" />
        <Setter Property="ScrollViewer.IsVerticalRailEnabled" Value="True" />
        <Setter Property="ScrollViewer.ZoomMode" Value="Disabled" />
        <Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False" />
        <Setter Property="ScrollViewer.BringIntoViewOnFocusChange" Value="True" />
        <Setter Property="Background" Value="{ThemeResource TelerikAutoCompleteBoxSelectorBackgroundBrush}" />
        <Setter Property="BorderBrush" Value="{ThemeResource TelerikAutoCompleteBoxSelectorBorderBrush}" />
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <VirtualizingStackPanel />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="localAutoComplete:SuggestionItemsControl">
                    <Border x:Name="RootElement" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="RootElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Transparent" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="BorderBrush" Storyboard.TargetName="RootElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxDisabledForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="RootElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListBoxFocusBackgroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ScrollViewer x:Name="ScrollViewer"
                                      BringIntoViewOnFocusChange="{TemplateBinding ScrollViewer.BringIntoViewOnFocusChange}"
                                      HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
                                      HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                                      IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}"
                                      IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}"
                                      IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
                                      Padding="{TemplateBinding Padding}"
                                      TabNavigation="{TemplateBinding TabNavigation}"
                                      VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                                      VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}"
                                      ZoomMode="{TemplateBinding ScrollViewer.ZoomMode}">
                            <ItemsPresenter />
                        </ScrollViewer>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:RadAutoCompleteBox" BasedOn="{StaticResource RadAutoCompleteBoxStyle}">
        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
        <Setter Property="Padding" Value="{ThemeResource TextControlThemePadding}" />
        <Setter Property="Foreground" Value="{ThemeResource TelerikAutoCompleteBoxForegroundBrush}" />
        <Setter Property="Background" Value="{ThemeResource TelerikAutoCompleteBoxBackgroundBrush}" />
        <Setter Property="BorderBrush" Value="{ThemeResource TelerikAutoCompleteBoxBorderBrush}" />
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="DropDownMaxHeight" Value="328" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="HeaderStyle">
            <Setter.Value>
                <Style TargetType="ContentControl">
                    <Setter Property="Foreground" Value="{ThemeResource TelerikAutoCompleteBoxHeaderForegroundBrush}" />
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:RadAutoCompleteBox">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="WatermarkElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TelerikAutoCompleteBoxWatermarkDisabledForegroundBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="WatermarkUnfocused" />
                                <VisualState x:Name="WatermarkFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility" Storyboard.TargetName="WatermarkElement">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="*" />
                        </Grid.RowDefinitions>

                        <ContentControl Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}"
                                        Style="{TemplateBinding HeaderStyle}" IsTabStop="False" IsHitTestVisible="False" />

                        <localAutoComplete:AutoCompleteTextBox x:Name="PART_TextBox" Grid.Row="1"
                                                               Foreground="{TemplateBinding Foreground}"
                                                               FontSize="{TemplateBinding FontSize}"
                                                               FontFamily="{TemplateBinding FontFamily}"
                                                               FontStyle="{TemplateBinding FontStyle}"
                                                               FontWeight="{TemplateBinding FontWeight}"
                                                               Background="{TemplateBinding Background}"
                                                               BorderBrush="{TemplateBinding BorderBrush}"
                                                               BorderThickness="{TemplateBinding BorderThickness}"
                                                               Padding="{TemplateBinding Padding}" />
                        <ContentControl x:Name="WatermarkElement" IsTabStop="False" IsHitTestVisible="False"
                                        Content="{TemplateBinding Watermark}" ContentTemplate="{TemplateBinding WatermarkTemplate}"
                                        FontWeight="Normal"
                                        FontStyle="Normal"
                                        Foreground="{ThemeResource TelerikAutoCompleteBoxWatermarkForegroundBrush}"
                                        Background="{ThemeResource TextBoxBackgroundThemeBrush}"
                                        BorderBrush="{ThemeResource TextBoxBorderThemeBrush}"
                                        BorderThickness="{ThemeResource TextControlBorderThemeThickness}"
                                        Padding="0,2"
                                        Margin="{TemplateBinding Padding}"
                                        Grid.Row="1" />

                        <Popup x:Name="PART_Popup" IsOpen="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsDropDownOpen, Mode=TwoWay}"
                               AutomationProperties.AccessibilityView="Raw">
                            <Popup.Child>
                                <Grid>
                                    <localAutoComplete:SuggestionItemsControl x:Name="PART_SuggestionsControl"
                                                                          DisplayMemberPath="{TemplateBinding DisplayMemberPath}"
                                                                          ItemTemplate="{TemplateBinding ItemTemplate}"
                                                                          AutomationProperties.LiveSetting="Polite"
                                                                          ItemTemplateSelector="{TemplateBinding ItemTemplateSelector}" />
                                    <ContentControl x:Name="PART_NoResultsControl" Visibility="Collapsed" ContentTemplate="{TemplateBinding NoResultsContentTemplate}"
                                                    BorderBrush ="{ThemeResource TelerikAutoCompleteBoxSelectorItemBorderBrush}"
                                                    HorizontalContentAlignment="Center" VerticalContentAlignment="Center"  />
                                </Grid>
                            </Popup.Child>
                        </Popup>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--#endregion-->

    <!--#region DateTimePicker-->

    <Style TargetType="localDateTime:DateTimeListItem" BasedOn="{StaticResource DateTimeListItemStyle}">

        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="IsHitTestVisible" Value="True" />
        <Setter Property="Template" Value="{StaticResource DateTimeListItemControlTemplate}" />
    </Style>

    <Style TargetType="localDateTime:DateTimeList" BasedOn="{StaticResource DateTimeListStyle}">
        <Setter Property="IsTabStop" Value="True" />
        <Setter Property="IsCentered" Value="True" />
        <Setter Property="HorizontalAlignment" Value="Center" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="localDateTime:DateTimeList">
                    <Border Background="{TemplateBinding Background}">
                        <primitivesLoopingList:LoopingPanel x:Name="PART_Panel" />
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="localDateTime:DateTimePickerButton" BasedOn="{StaticResource DateTimePickerButtonBaseStyle}">
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="Template" Value="{StaticResource DateTimePickerButtonControlTemplate}" />
    </Style>

    <Style TargetType="local:DateTimePicker" x:Key="DateTimePickerCommonStyle" BasedOn="{StaticResource DateTimePickerBaseStyle}">
        <Setter Property="VerticalAlignment" Value="Top" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="IsTabStop" Value="True" />
        <Setter Property="ItemSpacing" Value="5" />
        <Setter Property="Background" Value="{ThemeResource TelerikDateTimePickerBackgroundBrush}" />
        <Setter Property="BorderBrush" Value="{ThemeResource TelerikDateTimePickerBorderBrush}" />
        <Setter Property="Foreground" Value="{ThemeResource TelerikDateTimePickerForegroundBrush}" />
        <Setter Property="SelectorBackgroundStyle" Value="{StaticResource DateTimePickerSelectorBackgroundStyle}" />
        <Setter Property="HeaderStyle" Value="{StaticResource TelerikHeaderContentPresenterStyle}" />
        <Setter Property="UseSystemFocusVisuals" Value="True" />
    </Style>

    <Style TargetType="local:RadDatePicker" BasedOn="{StaticResource DateTimePickerCommonStyle}">
        <Setter Property="Template" Value="{StaticResource RadDatePickerControlTemplate}" />
    </Style>

    <Style TargetType="local:RadTimePicker" BasedOn="{StaticResource DateTimePickerCommonStyle}">
        <Setter Property="Template" Value="{StaticResource RadTimePickerControlTemplate}" />
    </Style>

    <!--#endregion-->
</ResourceDictionary>

