<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:grid="clr-namespace:Telerik.Windows.Controls.GridView;assembly=Telerik.Windows.Controls.GridView"
					xmlns:treelist="clr-namespace:Telerik.Windows.Controls.TreeListView;assembly=Telerik.Windows.Controls.GridView"
					xmlns:controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView"
				
				
			
	>

	<SolidColorBrush x:Key="ControlOuterBorder" Color="#FF000000"/>
<SolidColorBrush x:Key="ItemBackground_Over" Color="#FF565656" />
<SolidColorBrush x:Key="ItemBackground_Selected" Color="#FF6C6C6C" />
<SolidColorBrush x:Key="GridViewCell_CurrentBorder" Color="#FF789FC3" />
<SolidColorBrush x:Key="ItemBackground_Invalid" Color="#FFCE3A4A" />
<SolidColorBrush x:Key="ItemBackground" Color="#FF3D3D3D" />
<SolidColorBrush x:Key="ControlOuterBorder_Invalid" Color="#FFDC000C" />
<SolidColorBrush x:Key="ControlInnerBorder_Invalid" Color="#FF333333" />
<SolidColorBrush x:Key="ItemBackground_Disabled" Color="#FF434343" />
<SolidColorBrush x:Key="GridView_CellBackground_Edited" Color="#FF333333" />
<SolidColorBrush x:Key="GridView_GridLinesItemBorder" Color="Black" />

	
	<grid:GridLineWidthToThicknessConverter x:Key="GridLineWidthToThicknessConverter" />
	
	<Style x:Key="FocusVisualStyle">
		<Setter Property="Control.Template">
			<Setter.Value>
				<ControlTemplate>
					<Border Margin="1,1,2,2" BorderThickness="1" CornerRadius="1" BorderBrush="{StaticResource ControlOuterBorder}" />
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	

	<ControlTemplate x:Key="ValidationToolTipTemplate" TargetType="ToolTip">
		<Grid x:Name="Root" Margin="5,0" Opacity="0" RenderTransformOrigin="0,0">

			
			<Grid.RenderTransform>
				<TranslateTransform x:Name="xform" X="-25"/>
			</Grid.RenderTransform>

			<Border Margin="4,4,-4,-4" Background="#052A2E31" CornerRadius="5"/>
			<Border Margin="3,3,-3,-3" Background="#152A2E31" CornerRadius="4"/>
			<Border Margin="2,2,-2,-2" Background="#252A2E31" CornerRadius="3"/>
			<Border Margin="1,1,-1,-1" Background="#352A2E31" CornerRadius="2"/>
			<Border Background="#FFDC000C" CornerRadius="2"/>
			<Border CornerRadius="2">
				<ItemsControl ItemsSource="{TemplateBinding Content}">
					<ItemsControl.ItemTemplate>
						<DataTemplate>
							<TextBlock Margin="8,4,8,4" MaxWidth="250" Foreground="White" Text="{Binding}" TextWrapping="Wrap"/>
						</DataTemplate>
					</ItemsControl.ItemTemplate>
					<ItemsControl.ItemsPanel>
						<ItemsPanelTemplate>
							<StackPanel />
						</ItemsPanelTemplate>
					</ItemsControl.ItemsPanel>
				</ItemsControl>
			</Border>
		</Grid>

		
		<ControlTemplate.Triggers>
			<Trigger Property="IsOpen" Value="True">
				<Trigger.EnterActions>
					<BeginStoryboard x:Name="OpenAnimation">
						<Storyboard>
							<DoubleAnimation Storyboard.TargetName="xform"
									Storyboard.TargetProperty="X" To="0" Duration="0:0:0.2" />
							<DoubleAnimation Storyboard.TargetName="Root"
									Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.2" />
						</Storyboard>
					</BeginStoryboard>
				</Trigger.EnterActions>
				<Trigger.ExitActions>
					<StopStoryboard BeginStoryboardName="OpenAnimation" />
				</Trigger.ExitActions>
			</Trigger>
			<Trigger Property="IsOpen" Value="True">
				<Setter TargetName="Root" Property="RenderTransform">
					<Setter.Value>
						<TranslateTransform X="0" />
					</Setter.Value>
				</Setter>
				<Setter Property="Opacity" Value="1" TargetName="Root" />
			</Trigger>
			<Trigger Property="IsOpen" Value="False">
				<Setter Property="Opacity" Value="0" TargetName="Root" />
			</Trigger>
		</ControlTemplate.Triggers>
		

	</ControlTemplate>

	<ControlTemplate x:Key="GridViewCellTemplate" TargetType="grid:GridViewCell">
		<Grid>
			

			<Border x:Name="PART_CellBorder" 
				Background="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}"
				BorderBrush="{TemplateBinding VerticalGridLinesBrush}"
				BorderThickness="{Binding VerticalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Right}" />

			<Border x:Name="Background_Over" Background="{StaticResource ItemBackground_Over}"						
					BorderBrush="{TemplateBinding VerticalGridLinesBrush}"
					BorderThickness="{Binding VerticalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Right}"
					Grid.Column="2" Grid.ColumnSpan="2"  Visibility="Collapsed" />

			<Border x:Name="Background_Selected" Background="{StaticResource ItemBackground_Selected}"						
					BorderBrush="{TemplateBinding VerticalGridLinesBrush}"
					BorderThickness="{Binding VerticalGridLinesWidth, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GridLineWidthToThicknessConverter}, ConverterParameter=Right}"
					Grid.Column="2" Grid.ColumnSpan="2" Visibility="Collapsed" />

			<Border x:Name="Background_Current"
						Margin="1,1,2,2" BorderThickness="1" CornerRadius="1" 
						BorderBrush="{StaticResource GridViewCell_CurrentBorder}" 
						Grid.Column="2" Grid.ColumnSpan="2" Visibility="Collapsed" />



			<Border x:Name="Background_Invalid_Unfocused"
						Visibility="Collapsed"
						Background="{StaticResource ItemBackground_Invalid}"
						Grid.Column="2" Grid.ColumnSpan="2" Opacity="1" />

			<Border x:Name="Background_Invalid"
					Background="{StaticResource ItemBackground}"
					Margin="1,1,2,2" BorderThickness="1" CornerRadius="1" 
					BorderBrush="{StaticResource ControlOuterBorder_Invalid}" 
					Grid.Column="2" Grid.ColumnSpan="2" Visibility="Collapsed">
				<ToolTipService.ToolTip>
					<ToolTip x:Name="validationTooltip" Placement="Right" 
						 Content="{TemplateBinding Errors}"
						 Template="{StaticResource ValidationToolTipTemplate}">
					</ToolTip>
				</ToolTipService.ToolTip>
				<Grid Height="12" HorizontalAlignment="Right" Margin="1,-4,-4,0" VerticalAlignment="Top" Width="12" Background="Transparent">
					<Path Fill="{StaticResource ControlOuterBorder_Invalid}" Margin="1,3,0,0" Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z"/>
					<Path Fill="{StaticResource ControlInnerBorder_Invalid}" Margin="1,3,0,0" Data="M 0,0 L2,0 L 8,6 L8,8"/>
				</Grid>
			</Border>
			<Border x:Name="Background_Disabled"
						Background="{StaticResource ItemBackground_Disabled}"
						Grid.Column="2" Grid.ColumnSpan="2" Visibility="Collapsed">

			</Border>

			<ContentPresenter x:Name="PART_ContentPresenter"
								Margin="{TemplateBinding Padding}"
								Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"
								VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
								HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"/>


		</Grid>
		
		<ControlTemplate.Triggers>
			<Trigger Property="IsInEditMode" Value="True">
				<Setter Property="Padding" Value="0" />
				<Setter Property="VerticalContentAlignment" Value="Stretch" />
				<Setter TargetName="PART_CellBorder" Property="Background" Value="{StaticResource GridView_CellBackground_Edited}" />
			</Trigger>
			<MultiTrigger>
				<MultiTrigger.Conditions>
					<Condition Property="DisplayVisualCues" Value="True"/>
					<Condition Property="ParentRowValid" Value="false"/>
				</MultiTrigger.Conditions>
				<Setter TargetName="Background_Invalid_Unfocused" Property="Visibility" Value="Visible" />
			</MultiTrigger>
			<MultiTrigger>
				<MultiTrigger.Conditions>
					<Condition Property="IsSelected" Value="True"/>
					<Condition Property="DisplayVisualCues" Value="True"/>
				</MultiTrigger.Conditions>
				<Setter TargetName="Background_Selected" Property="Visibility" Value="Visible" />
			</MultiTrigger>
			<MultiTrigger>
				<MultiTrigger.Conditions>
					<Condition Property="IsMouseOver" Value="True"/>
					<Condition Property="DisplayVisualCues" Value="True"/>
				</MultiTrigger.Conditions>
				<Setter TargetName="Background_Over" Property="Visibility" Value="Visible" />
			</MultiTrigger>
			<Trigger Property="IsEnabled" Value="False">
				<Setter TargetName="PART_CellBorder" Property="Opacity" Value="0.40" />
				<Setter TargetName="Background_Disabled" Property="Visibility" Value="Visible" />
			</Trigger>
			<Trigger Property="IsCurrent" Value="True">
				<Setter TargetName="Background_Current" Property="Visibility" Value="Visible" />
			</Trigger>
			<Trigger Property="IsValid" Value="False">
				<Setter TargetName="Background_Invalid" Property="Visibility" Value="Visible" />
			</Trigger>
		</ControlTemplate.Triggers>
		

	</ControlTemplate>

	<Style 
		
		x:Key="{telerik:ThemeResourceKey ThemeType=
		telerik:ExpressionDarkTheme , ElementType=grid:GridViewCell}"
		
		TargetType="grid:GridViewCell">
		<Setter Property="Template" Value="{StaticResource GridViewCellTemplate}"/>

		<Setter Property="Padding" Value="5,0,3,0"/>
		<Setter Property="BorderBrush" Value="{StaticResource GridView_GridLinesItemBorder}"/>
		<Setter Property="BorderThickness" Value="0,0,1,0" />
		<Setter Property="VerticalContentAlignment" Value="Center" />
		<Setter Property="HorizontalContentAlignment" Value="Stretch" />
		<Setter Property="Background" Value="Transparent" />
		
		<Setter Property="SnapsToDevicePixels" Value="True" />
		<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisualStyle}" />
		
	</Style>

	
	
</ResourceDictionary>