<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
		xmlns:vistaCopy="clr-namespace:VistaThemeCopy"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		

							xmlns:sys="clr-namespace:System;assembly=mscorlib"
							xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
							xmlns:calendar="clr-namespace:Telerik.Windows.Controls.Calendar;assembly=Telerik.Windows.Controls.Input"
							xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
							xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
							xmlns:telerikChromes="clr-namespace:Telerik.Windows.Controls.Chromes;assembly=Telerik.Windows.Controls"
							xmlns:primitives="clr-namespace:Telerik.Windows.Controls.Primitives;assembly=Telerik.Windows.Controls"
							xmlns:telerikMaskedTextBox="clr-namespace:Telerik.Windows.Controls.MaskedTextBox;assembly=Telerik.Windows.Controls.Input"


>
 
  <SolidColorBrush x:Key="ButtonIconBackground_Normal" Color="Transparent" />
<SolidColorBrush x:Key="ButtonIconForeground_Normal" Color="#FF282828" />
<ControlTemplate x:Key="ArrowTemplate_Up" TargetType="ContentControl">
		<Grid>
			<Path x:Name="ForegroundIcon" Data="M0,3 L5,3 5,2 4,2 4,1 3,1 3,0 2,0 2,1 1,1 1,2 0,2 0,3 z" Width="5" Height="3" Fill="{TemplateBinding Foreground}" Margin="3 0" />
		</Grid>
	</ControlTemplate>
<SolidColorBrush x:Key="ButtonIconForeground_MouseOver" Color="#FF282828" />
<SolidColorBrush x:Key="ButtonIconBackground_MouseOver" Color="Transparent" />
<SolidColorBrush x:Key="ButtonIconForeground_Pressed" Color="#FF282828" />
<SolidColorBrush x:Key="ButtonIconBackground_Pressed" Color="Transparent" />
<SolidColorBrush x:Key="ButtonIconForeground_Disabled" Color="#FF282828" />
<SolidColorBrush x:Key="ButtonIconBackground_Disabled" Color="Transparent" />
<ControlTemplate x:Key="ArrowTemplate_Down" TargetType="ContentControl">
		<Grid>
			<Path x:Name="ForegroundIcon" Data="M0,0 L5,0 5,1 4,1 4,2 3,2 3,3 2,3 2,2 1,2 1,1 0,1 0,0 z" Width="5" Height="3" Fill="{TemplateBinding Foreground}" Margin="3 0" />
		</Grid>
	</ControlTemplate>
<CornerRadius x:Key="SplitButton_SpanCornerRadius">2</CornerRadius>
<vistaCopy:VistaThemeCopyTheme x:Key="Theme" />
<SolidColorBrush x:Key="ControlOuterBorder_Focused" Color="#FF3C7FB1" />
<SolidColorBrush x:Key="ControlInnerBorder_Focused" Color="#FF99DEFD" />
<CornerRadius x:Key="SplitButton_SpanInnerCornerRadius">1</CornerRadius>
<CornerRadius x:Key="SplitButton_TopRightPartCornerRadius">0 2 0 0</CornerRadius>
<CornerRadius x:Key="SplitButton_BottomRightPartCornerRadius">0 0 2 0</CornerRadius>
<SolidColorBrush x:Key="ControlOuterBorder_Disabled" Color="#FFA9A9A9" />
<SolidColorBrush x:Key="PickerForeground_Disabled" Color="#FF8D8D8D" />
<SolidColorBrush x:Key="ControlOuterBorder_MouseOver" Color="#FF3C7FB1" />
<CornerRadius x:Key="SplitButton_TopPartCornerRadius">2 2 0 0</CornerRadius>
<CornerRadius x:Key="SplitButton_BottomPartCornerRadius">0 0 2 2</CornerRadius>
<SolidColorBrush x:Key="ControlOuterBorder_Normal" Color="#FF898C95" />
<SolidColorBrush x:Key="PickerForeground_Normal" Color="#FF000000" />
<SolidColorBrush x:Key="PickerBackground_Normal" Color="#FFFFFFFF" />

  
	
	<Style x:Key="IncreaseButtonStyle" TargetType="RepeatButton">
		<Setter Property="Background" Value="{StaticResource ButtonIconBackground_Normal}" />
		<Setter Property="Foreground" Value="{StaticResource ButtonIconForeground_Normal}" />
		<Setter Property="MinWidth" Value="15" />
		
		<Setter Property="FocusVisualStyle" Value="{x:Null}" />
		
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="RepeatButton">
					<Grid>
						
						<ContentPresenter />
						<ContentControl x:Name="Arrow" Template="{StaticResource ArrowTemplate_Up}" IsTabStop="False"/>
					</Grid>
					
					<ControlTemplate.Triggers>
						<Trigger Property="IsMouseOver" Value="True">
							<Setter TargetName="Arrow" Property="Foreground" Value="{StaticResource ButtonIconForeground_MouseOver}" />
							<Setter TargetName="Arrow" Property="Background" Value="{StaticResource ButtonIconBackground_MouseOver}" />
						</Trigger>
						<Trigger Property="IsPressed" Value="True">
							<Setter TargetName="Arrow" Property="Foreground" Value="{StaticResource ButtonIconForeground_Pressed}" />
							<Setter TargetName="Arrow" Property="Background" Value="{StaticResource ButtonIconBackground_Pressed}" />
						</Trigger>
						<Trigger Property="IsEnabled" Value="False">
							<Setter TargetName="Arrow" Property="Foreground" Value="{StaticResource ButtonIconForeground_Disabled}" />
							<Setter TargetName="Arrow" Property="Background" Value="{StaticResource ButtonIconBackground_Disabled}" />
						</Trigger>
					</ControlTemplate.Triggers>
					
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	
	<Style x:Key="DecreaseButtonStyle" TargetType="RepeatButton">
		<Setter Property="Background" Value="{StaticResource ButtonIconBackground_Normal}" />
		<Setter Property="Foreground" Value="{StaticResource ButtonIconForeground_Normal}" />
		<Setter Property="MinWidth" Value="15" />
		
		<Setter Property="FocusVisualStyle" Value="{x:Null}" />
		
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="RepeatButton">
					<Grid>
						
						<ContentPresenter />
						<ContentControl x:Name="Arrow" Template="{StaticResource ArrowTemplate_Down}" IsTabStop="False" />
					</Grid>
					
					<ControlTemplate.Triggers>
						<Trigger Property="IsMouseOver" Value="True">
							<Setter TargetName="Arrow" Property="Foreground" Value="{StaticResource ButtonIconForeground_MouseOver}" />
							<Setter TargetName="Arrow" Property="Background" Value="{StaticResource ButtonIconBackground_MouseOver}" />
						</Trigger>
						<Trigger Property="IsPressed" Value="True">
							<Setter TargetName="Arrow" Property="Foreground" Value="{StaticResource ButtonIconForeground_Pressed}" />
							<Setter TargetName="Arrow" Property="Background" Value="{StaticResource ButtonIconBackground_Pressed}" />
						</Trigger>
						<Trigger Property="IsEnabled" Value="False">
							<Setter TargetName="Arrow" Property="Foreground" Value="{StaticResource ButtonIconForeground_Disabled}" />
							<Setter TargetName="Arrow" Property="Background" Value="{StaticResource ButtonIconBackground_Disabled}" />
						</Trigger>
					</ControlTemplate.Triggers>
					
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<ControlTemplate x:Key="RadNumericUpDownTemplate" TargetType="telerikInput:RadNumericUpDown">
		<Grid x:Name="LayoutRoot">
			
			<Grid.RowDefinitions>
				<RowDefinition Height="*" />
				<RowDefinition Height="*" />
			</Grid.RowDefinitions>
			<Grid.ColumnDefinitions>
				<ColumnDefinition x:Name="colDefText" Width="*" />
				<ColumnDefinition x:Name="colDefButtons" Width="Auto" />
			</Grid.ColumnDefinitions>
			
			<Border x:Name="background" Grid.RowSpan="2" Grid.ColumnSpan="2" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}"
					BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" />

			<telerik:PickerTextBox x:Name="textbox"
					Grid.Row="0" Grid.RowSpan="2" Grid.Column="0"
					telerik:StyleManager.Theme="{StaticResource Theme}"
					BorderThickness="{TemplateBinding BorderThickness}"
					Padding="{TemplateBinding Padding}"
					HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
					VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"/>

			<Border x:Name="FocusVisual" Visibility="Collapsed" Grid.RowSpan="2" Grid.ColumnSpan="2" BorderBrush="{StaticResource ControlOuterBorder_Focused}" CornerRadius="{StaticResource SplitButton_SpanCornerRadius}" BorderThickness="{TemplateBinding BorderThickness}">
				<Border BorderBrush="{StaticResource ControlInnerBorder_Focused}" CornerRadius="{StaticResource SplitButton_SpanInnerCornerRadius}" BorderThickness="{TemplateBinding BorderThickness}" />
			</Border>

			<RepeatButton x:Name="increase" Grid.Row="0" Grid.Column="1" Style="{StaticResource IncreaseButtonStyle}" IsTabStop="{TemplateBinding AreButtonsTabStops}">
				<telerikChromes:ButtonChrome x:Name="increaseButtonChrome"
						IsTabStop="False"
						CornerRadius="{StaticResource SplitButton_TopRightPartCornerRadius}"
						telerik:StyleManager.Theme="{StaticResource Theme}"
						BorderBrush="{TemplateBinding BorderBrush}"
						RenderFocused="{Binding IsFocused, ElementName=increase}"
						RenderMouseOver="{Binding IsMouseOver, ElementName=increase}"
						RenderPressed="{Binding IsPressed, ElementName=increase}"
						RenderEnabled="{Binding IsEnabled, ElementName=increase}"
						
						RenderActive="{TemplateBinding IsMouseOver}"
						 />
			</RepeatButton>
			<RepeatButton x:Name="decrease" Grid.Row="1" Grid.Column="1" Style="{StaticResource DecreaseButtonStyle}" IsTabStop="{TemplateBinding AreButtonsTabStops}">
				<telerikChromes:ButtonChrome x:Name="decreaseButtonChrome"
						IsTabStop="False"
						CornerRadius="{StaticResource SplitButton_BottomRightPartCornerRadius}"
						telerik:StyleManager.Theme="{StaticResource Theme}"
						BorderBrush="{TemplateBinding BorderBrush}"
						RenderFocused="{Binding IsFocused, ElementName=decrease}"
						RenderMouseOver="{Binding IsMouseOver, ElementName=decrease}"
						RenderPressed="{Binding IsPressed, ElementName=decrease}"
						RenderEnabled="{Binding IsEnabled, ElementName=decrease}"
						
						RenderActive="{TemplateBinding IsMouseOver}"
						 />
			</RepeatButton>
			
		</Grid>
		
		<ControlTemplate.Triggers>
			<Trigger Property="IsEnabled" Value="False">
				<Setter TargetName="background" Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Disabled}" />
				<Setter TargetName="textbox" Property="Foreground" Value="{StaticResource PickerForeground_Disabled}" />
			</Trigger>
			<Trigger Property="IsMouseOver" Value="True">
				<Setter TargetName="background" Property="BorderBrush" Value="{StaticResource ControlOuterBorder_MouseOver}" />
			</Trigger>
			<Trigger Property="IsKeyboardFocusWithin" Value="True">
				<Setter TargetName="FocusVisual" Property="Visibility" Value="Visible" />
			</Trigger>
			<MultiTrigger>
				<MultiTrigger.Conditions>
					<Condition Property="ShowTextBox" Value="True" />
					<Condition Property="IsKeyboardFocusWithin" Value="True" />
				</MultiTrigger.Conditions>
				<Setter TargetName="decreaseButtonChrome" Property="RenderFocused" Value="True" />
				<Setter TargetName="increaseButtonChrome" Property="RenderFocused" Value="True" />
			</MultiTrigger>
			<Trigger Property="ShowTextBox" Value="False">
				<Setter TargetName="textbox" Property="Visibility" Value="Collapsed" />
				<Setter TargetName="colDefText" Property="Width" Value="auto" />
				<Setter TargetName="colDefButtons" Property="Width" Value="*" />
				<Setter TargetName="decreaseButtonChrome" Property="RenderActive" Value="False" />
				<Setter TargetName="increaseButtonChrome" Property="RenderActive" Value="False" />
				<Setter TargetName="increaseButtonChrome" Property="CornerRadius" Value="{StaticResource SplitButton_TopPartCornerRadius}"  />
				<Setter TargetName="decreaseButtonChrome" Property="CornerRadius" Value="{StaticResource SplitButton_BottomPartCornerRadius}" />
			</Trigger>
			<Trigger Property="ShowButtons" Value="False">
				<Setter TargetName="increase" Property="Visibility" Value="Collapsed" />
				<Setter TargetName="decrease" Property="Visibility" Value="Collapsed" />
			</Trigger>
		</ControlTemplate.Triggers>
		
	</ControlTemplate>

	<Style TargetType="telerikInput:RadNumericUpDown" x:Key="{telerik:ThemeResourceKey ThemeType=vistaCopy:VistaThemeCopyTheme , ElementType=telerikInput:RadNumericUpDown}" >
		<Setter Property="Template" Value="{StaticResource RadNumericUpDownTemplate}" />
		<Setter Property="MinHeight" Value="22" />
		<Setter Property="MinWidth" Value="60" />
		<Setter Property="Padding" Value="4 0" />
		<Setter Property="BorderThickness" Value="1" />
		<Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}" />
		<Setter Property="Foreground" Value="{StaticResource PickerForeground_Normal}" />
		<Setter Property="Background" Value="{StaticResource PickerBackground_Normal}" />
		<Setter Property="HorizontalContentAlignment" Value="Right" />
		<Setter Property="VerticalContentAlignment" Value="Center" />
		<Setter Property="IsTabStop" Value="false" />
		
		<Setter Property="SnapsToDevicePixels" Value="True" />
		
	</Style>

	
</ResourceDictionary>