<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Style x:Key="FilesListViewStyle" TargetType="{x:Type ListView}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListView}">
                    <Border
                        x:Name="Bd"
                        Padding="1"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        SnapsToDevicePixels="true">
                        <ScrollViewer Padding="{TemplateBinding Padding}" Focusable="false">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition />

                                </Grid.RowDefinitions>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="4.5*" MinWidth="0" />
                                        <ColumnDefinition Width="3*" />
                                        <ColumnDefinition Width="2*" />
                                        <ColumnDefinition Width="100" />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock
                                        Margin="12,0,0,6"
                                        HorizontalAlignment="Left"
                                        VerticalAlignment="Center"
                                        FontSize="14" />
                                    <!--  Text="{x:Static homePageUI:HomePage.RencentFiles_Name}"  -->
                                    <TextBlock
                                        Grid.Column="1"
                                        Margin="0,0,0,6"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        FontSize="14"
                                        TextAlignment="Center"
                                        TextWrapping="Wrap" />
                                    <!--  Text="{x:Static homePageUI:HomePage.RencentFiles_LastOpenedTime}"  -->
                                    <TextBlock
                                        Grid.Column="2"
                                        Margin="0,0,0,6"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        FontSize="14" />
                                    <!--  Text="{x:Static homePageUI:HomePage.RencentFiles_Size}"  -->
                                    <Rectangle
                                        Grid.ColumnSpan="4"
                                        Height="1"
                                        Margin="12,0,0,0"
                                        HorizontalAlignment="Stretch"
                                        VerticalAlignment="Bottom"
                                        Fill="#26000000" />
                                </Grid>
                                <ItemsPresenter Grid.Row="1" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                            </Grid>
                        </ScrollViewer>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="FilesListViewItemStyle" TargetType="{x:Type ListViewItem}">
        <Setter Property="UIElement.SnapsToDevicePixels" Value="True" />
        <!--<Setter Property="Control.Padding" Value="4,1" />
        <Setter Property="Control.HorizontalContentAlignment">
            <Setter.Value>
                <Binding Path="HorizontalContentAlignment" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ItemsControl, AncestorLevel=1}" />
            </Setter.Value>
        </Setter>
        <Setter Property="Control.VerticalContentAlignment">
            <Setter.Value>
                <Binding Path="VerticalContentAlignment" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ItemsControl, AncestorLevel=1}" />
            </Setter.Value>
        </Setter>-->
        <Setter Property="Panel.Background" Value="#00FFFFFF" />
        <Setter Property="Border.BorderBrush" Value="#00FFFFFF" />
        <Setter Property="Border.BorderThickness" Value="1" />
        <Setter Property="FrameworkElement.FocusVisualStyle">
            <Setter.Value>
                <Style TargetType="{x:Type IFrameworkInputElement}">
                    <Setter Property="Control.Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Rectangle
                                    Margin="2"
                                    SnapsToDevicePixels="True"
                                    Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
                                    StrokeDashArray="1 2"
                                    StrokeThickness="1" />
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Control.Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListViewItem}">
                    <Border
                        Name="Bd"
                        Padding="{TemplateBinding Control.Padding}"
                        Background="{TemplateBinding Panel.Background}"
                        BorderBrush="{TemplateBinding Border.BorderBrush}"
                        BorderThickness="{TemplateBinding Border.BorderThickness}"
                        SnapsToDevicePixels="True">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>
                            <Grid
                                x:Name="SelectedIcon"
                                Margin="12.5,0,0.5,0"
                                HorizontalAlignment="Left"
                                VerticalAlignment="Center"
                                Visibility="Collapsed">
                                <Rectangle
                                    x:Name="Selectedrect"
                                    Width="20"
                                    Height="20"
                                    HorizontalAlignment="Right"
                                    VerticalAlignment="Top"
                                    Fill="#FF477EDE" />
                                <Path
                                    x:Name="MultiSelectCheck"
                                    Width="15"
                                    Height="15"
                                    Margin="0,1,0,0"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center"
                                    Data="M15.3493 0.596191L16.0564 1.3033L5.44979 11.9099L0.146484 6.6066L0.853591 5.89949L5.45004 10.496L15.3493 0.596191Z"
                                    Fill="White" />
                            </Grid>
                            <ContentPresenter
                                Grid.Column="1"
                                Margin="15,0,0,0"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
                                Content="{TemplateBinding ContentControl.Content}"
                                ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
                                ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
                                SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
                        </Grid>

                    </Border>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="UIElement.IsMouseOver" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Property="Panel.Background" Value="#1A000000" />
                            <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#1A000000" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="Selector.IsSelectionActive" Value="False" />
                                <Condition Property="Selector.IsSelected" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Property="Panel.Background" Value="#1A477EDE" />
                            <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#1A477EDE" />
                            <!--<Setter TargetName="SelectedIcon" Property="Grid.Visibility" Value="Visible" />-->
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="Selector.IsSelectionActive" Value="True" />
                                <Condition Property="Selector.IsSelected" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Property="Panel.Background" Value="#1A477EDE" />
                            <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#1A477EDE" />
                            <!--<Setter TargetName="SelectedIcon" Property="Grid.Visibility" Value="Visible" />-->
                        </MultiTrigger>
                        <Trigger Property="UIElement.IsEnabled" Value="False">
                            <Setter TargetName="Bd" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


    <Style x:Key="FilesGridItemStyle" TargetType="{x:Type ListViewItem}">
        <Setter Property="UIElement.SnapsToDevicePixels" Value="True" />
        <!--<Setter Property="Control.Padding" Value="4,1" />
        <Setter Property="Control.HorizontalContentAlignment">
            <Setter.Value>
                <Binding Path="HorizontalContentAlignment" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ItemsControl, AncestorLevel=1}" />
            </Setter.Value>
        </Setter>
        <Setter Property="Control.VerticalContentAlignment">
            <Setter.Value>
                <Binding Path="VerticalContentAlignment" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType=ItemsControl, AncestorLevel=1}" />
            </Setter.Value>
        </Setter>-->
        <Setter Property="Panel.Background" Value="#00FFFFFF" />
        <Setter Property="Border.BorderBrush" Value="#00FFFFFF" />
        <Setter Property="Border.BorderThickness" Value="2" />
        <Setter Property="FrameworkElement.FocusVisualStyle">
            <Setter.Value>
                <Style TargetType="{x:Type IFrameworkInputElement}">
                    <Setter Property="Control.Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Rectangle
                                    Margin="2"
                                    SnapsToDevicePixels="True"
                                    Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
                                    StrokeDashArray="1 2"
                                    StrokeThickness="1" />
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="Control.Template">

            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListViewItem}">
                    <Border
                        Name="Bd"
                        Margin="0,0,12,24"
                        Padding="{TemplateBinding Control.Padding}"
                        Background="{TemplateBinding Panel.Background}"
                        BorderBrush="{TemplateBinding Border.BorderBrush}"
                        BorderThickness="{TemplateBinding Border.BorderThickness}"
                        SnapsToDevicePixels="True">
                        <Grid>
                            <ContentPresenter
                                HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
                                VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
                                Content="{TemplateBinding ContentControl.Content}"
                                ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
                                ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
                                SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
                            <Grid
                                x:Name="SelectedIcon"
                                HorizontalAlignment="Right"
                                VerticalAlignment="Top"
                                Visibility="Collapsed" />
                            <Grid
                                x:Name="UnSelectedIcon"
                                HorizontalAlignment="Right"
                                VerticalAlignment="Top"
                                Visibility="Collapsed">
                                <Rectangle
                                    x:Name="UnSelectedrect"
                                    Width="20"
                                    Height="20"
                                    HorizontalAlignment="Right"
                                    VerticalAlignment="Top"
                                    Fill="#FFE2E3E6" />
                            </Grid>
                        </Grid>

                    </Border>
                    <ControlTemplate.Triggers>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="UIElement.IsMouseOver" Value="True" />
                                <Condition Property="Selector.IsSelected" Value="False" />
                            </MultiTrigger.Conditions>
                            <!--<Setter Property="Panel.Background" TargetName="Bd" Value="#1A000000" />-->
                            <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#FF477EDE" />
                            <Setter TargetName="UnSelectedIcon" Property="Grid.Visibility" Value="Visible" />
                            <Setter TargetName="SelectedIcon" Property="Grid.Visibility" Value="Collapsed" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="Selector.IsSelectionActive" Value="False" />
                                <Condition Property="Selector.IsSelected" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Property="Panel.Background" Value="#1A477EDE" />
                            <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#1A477EDE" />
                            <Setter TargetName="SelectedIcon" Property="Grid.Visibility" Value="Visible" />
                            <Setter TargetName="UnSelectedIcon" Property="Grid.Visibility" Value="Collapsed" />
                        </MultiTrigger>
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="Selector.IsSelectionActive" Value="True" />
                                <Condition Property="Selector.IsSelected" Value="True" />
                            </MultiTrigger.Conditions>
                            <Setter TargetName="Bd" Property="Panel.Background" Value="#1A477EDE" />
                            <Setter TargetName="Bd" Property="Border.BorderBrush" Value="#1A477EDE" />
                            <Setter TargetName="SelectedIcon" Property="Grid.Visibility" Value="Visible" />
                            <Setter TargetName="UnSelectedIcon" Property="Grid.Visibility" Value="Collapsed" />
                        </MultiTrigger>
                        <Trigger Property="UIElement.IsEnabled" Value="False">
                            <Setter TargetName="Bd" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
                        </Trigger>

                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="FilesGridViewStyle" TargetType="{x:Type ListView}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ListView}">
                    <Border
                        x:Name="Bd"
                        Padding="1"
                        Background="{TemplateBinding Background}"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        SnapsToDevicePixels="true">
                        <ScrollViewer Padding="{TemplateBinding Padding}" Focusable="false">
                            <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </ScrollViewer>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="EmptyListViewItem" TargetType="ListViewItem">
        <Setter Property="Padding" Value="0" />
        <Setter Property="HorizontalContentAlignment" Value="Left" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <Setter Property="MinWidth" Value="88" />
        <Setter Property="MinHeight" Value="0" />
        <Setter Property="AllowDrop" Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ListViewItem">
                    <ContentControl HorizontalContentAlignment="Stretch" Width="{TemplateBinding Width}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


</ResourceDictionary>