<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
					xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
					xmlns:input="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input"
					
				
					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="ControlInnerBorder" Color="White" />
<telerik:Office_BlueTheme x:Key="Theme" />
<SolidColorBrush x:Key="GridView_IndicatorPrimaryColor" Color="#FF3C6AA3" />
<LinearGradientBrush x:Key="GridView_FilteringControlBackground" EndPoint="0.5,1" StartPoint="0.5,0">
		<GradientStop Color="#FFBCD1E4"/>
		<GradientStop Color="#FFE2F0FD" Offset="0.5"/>
	</LinearGradientBrush>
<SolidColorBrush x:Key="GridView_FilteringControlOuterBorder" Color="#FF83A5D2" />
<SolidColorBrush x:Key="ControlForeground" Color="Black" />

	
	<grid:FilterOperatorConverter x:Key="FilterOperatorConverter" />
	<grid:FilterCompositionLogicalOperatorConverter x:Key="FilterCompositionLogicalOperatorConverter" />

	<DataTemplate x:Key="ActionTemplate">
		<TextBlock Text="{Binding Converter={StaticResource FilterOperatorConverter}}" />
	</DataTemplate>

	<DataTemplate x:Key="LogicalOperatorTemplate">
		<TextBlock Text="{Binding Converter={StaticResource FilterCompositionLogicalOperatorConverter}}" />
	</DataTemplate>
	
	<ControlTemplate x:Key="FilteringControlTemplate" TargetType="grid:FilteringControl">
		<Border BorderThickness="{TemplateBinding BorderThickness}" 
				Margin="{TemplateBinding Margin}" 
				CornerRadius="1" 
				BorderBrush="{TemplateBinding BorderBrush}">
			<Border BorderBrush="{StaticResource ControlInnerBorder}" BorderThickness="1" Background="{TemplateBinding Background}">
				<StackPanel MinWidth="200" MaxWidth="350" Margin="{TemplateBinding Padding}" 
							VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
							HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}">					
					<StackPanel x:Name="PART_DistinctFilter" Visibility="{TemplateBinding DistinctFiltersVisibility}">
						<Grid>
							<Grid.ColumnDefinitions>
								<ColumnDefinition/>
								<ColumnDefinition/>
							</Grid.ColumnDefinitions>
							<CheckBox x:Name="PART_SelectAllCheckBox"
								  IsChecked="{Binding SelectAll, Mode=TwoWay}"
								  Margin="0,2"
								  telerik:LocalizationManager.ResourceKey="GridViewFilterSelectAll"
								  telerik:StyleManager.Theme="{StaticResource Theme}"/>
							<telerik:RadButton x:Name="PART_FilterCloseButton"  Grid.Column="1" Margin="0"  HorizontalAlignment="Right" VerticalAlignment="Top" telerik:StyleManager.Theme="{StaticResource Theme}" Width="13" Height="13">
								<Path Fill="{StaticResource GridView_IndicatorPrimaryColor}"
								
									  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
									VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
									  Width="6" Height="6" 
									  Data="M4,4L5,4 5,5 4,5z M0,4L1,4 1,5 0,5z M3,3L4,3 4,4 3,4z M1,3L2,3 2,4 1,4z M2,2L3,2 3,3 2,3z M4,0L5,0 5,1 4,1 4,2 3,2 3,0.99999994 4,0.99999994z M0,0L1,0 1,0.99999994 2,0.99999994 2,2 1,2 1,1 0,1z"/>
							</telerik:RadButton>
						</Grid>
						<ListBox x:Name="PART_DistinctValuesList"
								 ItemsSource="{Binding DistinctValues}"
								 telerik:StyleManager.Theme="{StaticResource Theme}"
								 ScrollViewer.HorizontalScrollBarVisibility="Auto"
								 MaxHeight="250"
								 SelectionMode="Multiple">
							
							<ListBox.ItemTemplate>
								<DataTemplate>
									<CheckBox IsChecked="{Binding IsActive, Mode=TwoWay}"
											  Content="{Binding ConvertedValue}"
											  VerticalContentAlignment="Center"
											  telerik:StyleManager.Theme="{StaticResource Theme}"/>
								</DataTemplate>
							</ListBox.ItemTemplate>
							<!--<ListBox.ItemContainerStyle>
								<Style TargetType="ListBoxItem" 
									   
									   
									   BasedOn="{StaticResource {telerik:ThemeResourceKey ThemeType=telerik:Office_BlueTheme, ElementType=ListBoxItem}}"
									   
									   >
								</Style>
							</ListBox.ItemContainerStyle>-->
						</ListBox>
					</StackPanel>
					<StackPanel Margin="0,2" Visibility="{TemplateBinding FieldFiltersVisibility}">
						<TextBlock telerik:LocalizationManager.ResourceKey="GridViewFilterShowRowsWithValueThat" Margin="0,2,0,0" />
						<input:RadComboBox x:Name="PART_Filter1ComboBox"
										   Margin="0,2,0,2"
										   ItemTemplate="{StaticResource ActionTemplate}"
										   telerik:StyleManager.Theme="{StaticResource Theme}"
										   ItemsSource="{Binding AvailableActions}"
										   SelectedItem="{Binding Filter1.Operator, Mode=TwoWay}" />
						<ContentControl x:Name="PART_Filter1ContentControl"
										DataContext="{Binding Filter1}"
										Margin="0, 2"
										HorizontalContentAlignment="Stretch"
										VerticalContentAlignment="Stretch"/>
						<input:RadComboBox x:Name="PART_LogicalOperatorsComboBox"
										   Margin="0,2"
										   telerik:StyleManager.Theme="{StaticResource Theme}"
										   ItemTemplate="{StaticResource LogicalOperatorTemplate}"
										   ItemsSource="{Binding LogicalOperators}"
										   SelectedItem="{Binding FieldFilterLogicalOperator, Mode=TwoWay}" />
						<input:RadComboBox x:Name="PART_Filter2ComboBox"
										   Margin="0,2"
										   telerik:StyleManager.Theme="{StaticResource Theme}"
										   ItemTemplate="{StaticResource ActionTemplate}"
										   ItemsSource="{Binding AvailableActions}"
										   SelectedItem="{Binding Filter2.Operator, Mode=TwoWay}" />
						<ContentControl x:Name="PART_Filter2ContentControl"
										DataContext="{Binding Filter2}"
										Margin="0, 2"
										HorizontalContentAlignment="Stretch"
										VerticalContentAlignment="Stretch"/>
						<!--<TextBox x:Name="PART_Filter2TextBox"
								 Text="{Binding Filter2.Value, Mode=TwoWay}"
								 VerticalContentAlignment="Center"
								 Margin="0,2" Padding="3,0"
								 telerik:StyleManager.Theme="{StaticResource Theme}"
								 Height="22" />
						<CheckBox x:Name="PART_Filter2MatchCaseCheckBox"
								  IsChecked="{Binding Filter2.IsCaseSensitive, Mode=TwoWay}"
								  Visibility="{Binding MatchCaseVisibility}"
								  Margin="0,2"
								  telerik:LocalizationManager.ResourceKey="GridViewFilterMatchCase"
								  telerik:StyleManager.Theme="{StaticResource Theme}"/>-->
					</StackPanel>
					<Grid>
						<Grid.ColumnDefinitions>
							<ColumnDefinition />
							<ColumnDefinition />
						</Grid.ColumnDefinitions>
						<Button x:Name="PART_ApplyFilterButton" Grid.Column="0"
								Margin="0,2,2,2" Height="22"
								telerik:LocalizationManager.ResourceKey="GridViewFilter"
								telerik:StyleManager.Theme="{StaticResource Theme}" />
						<Button x:Name="PART_ClearFilterButton" Grid.Column="1"
								Margin="2,2,0,2" Height="22"
								telerik:LocalizationManager.ResourceKey="GridViewClearFilter"
								telerik:StyleManager.Theme="{StaticResource Theme}" />
					</Grid>
				</StackPanel>
			</Border>
		</Border>

	</ControlTemplate>

	<Style TargetType="grid:FilteringControl" x:Key="{telerik:ThemeResourceKey ThemeType=telerik:Office_BlueTheme , ElementType=grid:FilteringControl}"
		 >
		<Setter Property="Template" Value="{StaticResource FilteringControlTemplate}" />
		
		<Setter Property="Background" Value="{StaticResource GridView_FilteringControlBackground}" />
		<Setter Property="BorderBrush" Value="{StaticResource GridView_FilteringControlOuterBorder}" />
		<Setter Property="Padding" Value="5" />
		<Setter Property="Margin" Value="0,2,0,0" />
		<Setter Property="BorderThickness" Value="1" />
		<Setter Property="VerticalContentAlignment" Value="Stretch" />
		<Setter Property="HorizontalContentAlignment" Value="Stretch" />
		<Setter Property="Foreground" Value="{StaticResource ControlForeground}" />
		
		<Setter Property="SnapsToDevicePixels" Value="True" />
		
	</Style>

	
	
</ResourceDictionary>