<ResourceDictionary x:Class="ICSharpCode.ILSpy.Metadata.MetadataTableViews"
			 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
			 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
			 xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls"
			 xmlns:local="clr-namespace:ICSharpCode.ILSpy.Metadata"
			 xmlns:reflection="clr-namespace:System.Reflection;assembly=mscorlib"
			 xmlns:cecil="clr-namespace:Mono.Cecil;assembly=Mono.Cecil"
			 xmlns:srm="clr-namespace:System.Reflection;assembly=System.Reflection.Metadata"
			 xmlns:dgx="urn:tom-englert.de/DataGridExtensions">
	
	<Style x:Key="DataGridCellStyle" TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource {x:Type DataGridCell}}">
		<Setter Property="BorderThickness" Value="0" />
		<Setter Property="Padding" Value="2" />
		<Setter Property="VerticalContentAlignment" Value="Center" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type DataGridCell}">
					<Border x:Name="Bd"
							BorderBrush="{TemplateBinding BorderBrush}"
							BorderThickness="{TemplateBinding BorderThickness}"
							Background="{TemplateBinding Background}"
							SnapsToDevicePixels="True">
						<ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}"
										  Content="{TemplateBinding Content}"
										  ContentStringFormat="{TemplateBinding ContentStringFormat}"
										  SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
										  Margin="{TemplateBinding Padding}"
										  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
										  VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<ControlTemplate x:Key="DefaultFilter">
		<Grid>
			<Control Style="{DynamicResource {x:Static dgx:DataGridFilter.IconStyleKey}}" />
			<TextBox Style="{DynamicResource {x:Static dgx:DataGridFilter.ColumnHeaderSearchTextBoxStyleKey}}"
				Text="{Binding Path=Filter, UpdateSourceTrigger=PropertyChanged}" />
		</Grid>
	</ControlTemplate>

	<ControlTemplate x:Key="HexFilter">
		<local:HexFilterControl Filter="{Binding Path=Filter, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=dgx:DataGridFilterColumnControl}}" />
	</ControlTemplate>

	<ControlTemplate x:Key="AssemblyFlagsFilter">
		<local:FlagsFilterControl FlagsType="{x:Type srm:AssemblyFlags}" Filter="{Binding Path=Filter, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=dgx:DataGridFilterColumnControl}}" />
	</ControlTemplate>

	<ControlTemplate x:Key="AssemblyHashAlgorithmFilter">
		<local:FlagsFilterControl FlagsType="{x:Type srm:AssemblyHashAlgorithm}" Filter="{Binding Path=Filter, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=dgx:DataGridFilterColumnControl}}" />
	</ControlTemplate>

	<ControlTemplate x:Key="MethodAttributesFilter">
		<local:FlagsFilterControl FlagsType="{x:Type reflection:MethodAttributes}" Filter="{Binding Path=Filter, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=dgx:DataGridFilterColumnControl}}" />
	</ControlTemplate>

	<ControlTemplate x:Key="MethodImplAttributesFilter">
		<local:FlagsFilterControl FlagsType="{x:Type reflection:MethodImplAttributes}" Filter="{Binding Path=Filter, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=dgx:DataGridFilterColumnControl}}" />
	</ControlTemplate>

	<ControlTemplate x:Key="MethodSemanticsAttributesFilter">
		<local:FlagsFilterControl FlagsType="{x:Type srm:MethodSemanticsAttributes}" Filter="{Binding Path=Filter, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=dgx:DataGridFilterColumnControl}}" />
	</ControlTemplate>

	<ControlTemplate x:Key="TypeAttributesFilter">
		<local:FlagsFilterControl FlagsType="{x:Type reflection:TypeAttributes}" Filter="{Binding Path=Filter, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=dgx:DataGridFilterColumnControl}}" />
	</ControlTemplate>

	<ControlTemplate x:Key="PropertyAttributesFilter">
		<local:FlagsFilterControl FlagsType="{x:Type reflection:PropertyAttributes}" Filter="{Binding Path=Filter, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=dgx:DataGridFilterColumnControl}}" />
	</ControlTemplate>

	<ControlTemplate x:Key="EventAttributesFilter">
		<local:FlagsFilterControl FlagsType="{x:Type reflection:EventAttributes}" Filter="{Binding Path=Filter, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=dgx:DataGridFilterColumnControl}}" />
	</ControlTemplate>

	<ControlTemplate x:Key="FieldAttributesFilter">
		<local:FlagsFilterControl FlagsType="{x:Type reflection:FieldAttributes}" Filter="{Binding Path=Filter, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=dgx:DataGridFilterColumnControl}}" />
	</ControlTemplate>

	<ControlTemplate x:Key="ManifestResourceAttributesFilter">
		<local:FlagsFilterControl FlagsType="{x:Type srm:ManifestResourceAttributes}" Filter="{Binding Path=Filter, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=dgx:DataGridFilterColumnControl}}" />
	</ControlTemplate>

	<ControlTemplate x:Key="GenericParameterAttributesFilter">
		<local:FlagsFilterControl FlagsType="{x:Type reflection:GenericParameterAttributes}" Filter="{Binding Path=Filter, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=dgx:DataGridFilterColumnControl}}" />
	</ControlTemplate>

	<ControlTemplate x:Key="PInvokeAttributesFilter">
		<local:FlagsFilterControl FlagsType="{x:Type cecil:PInvokeAttributes}" Filter="{Binding Path=Filter, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=dgx:DataGridFilterColumnControl}}" />
	</ControlTemplate>

	<Style x:Key="ItemContainerStyle" TargetType="ListViewItem">
		<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
	</Style>

	<local:ByteWidthConverter x:Key="byteWidthConverter" />

	<DataTemplate x:Key="CustomDebugInformationDetailsDataGrid">
		<DataGrid ItemsSource="{Binding RowDetails, Mode=OneWay}" GridLinesVisibility="None" CanUserAddRows="False"
				  CanUserDeleteRows="False" CanUserReorderColumns="False" HeadersVisibility="Column" EnableColumnVirtualization="True"
				  EnableRowVirtualization="True" RowHeight="20" IsReadOnly="True" SelectionMode="Single" SelectionUnit="FullRow"
				  AutoGenerateColumns="True" VerticalContentAlignment="Center" AutoGeneratedColumns="DataGrid_AutoGeneratedColumns" AutoGeneratingColumn="DataGrid_AutoGeneratingColumn"
				  CellStyle="{StaticResource DataGridCellStyle}" MaxHeight="250">
		</DataGrid>
	</DataTemplate>

	<DataTemplate x:Key="CustomDebugInformationDetailsTextBlob">
		<Grid MinWidth="800" MaxWidth="800" HorizontalAlignment="Left">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="*" />
			</Grid.ColumnDefinitions>
			<TextBox IsReadOnly="True" TextWrapping="Wrap" IsReadOnlyCaretVisible="True" Text="{Binding RowDetails, Mode=OneWay}"
					MinLines="10" MaxLines="25" />
		</Grid>
	</DataTemplate>

	<DataTemplate x:Key="HeaderFlagsDetailsDataGrid">
		<DataGrid ItemsSource="{Binding RowDetails, Mode=OneWay}" GridLinesVisibility="None" CanUserAddRows="False"
				  CanUserDeleteRows="False" CanUserReorderColumns="False" RowHeaderWidth="0" EnableColumnVirtualization="True"
				  EnableRowVirtualization="True" RowHeight="20" HeadersVisibility="None" IsReadOnly="True" SelectionMode="Single" SelectionUnit="FullRow"
				  VerticalContentAlignment="Center">
		</DataGrid>
	</DataTemplate>
</ResourceDictionary>
