123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445 |
- <ResourceDictionary
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:i="http://schemas.microsoft.com/xaml/behaviors">
- <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" />
- <TextBlock
- Grid.Column="1"
- Margin="0,0,0,6"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="14"
- TextAlignment="Center"
- TextWrapping="Wrap" />
- <TextBlock
- Grid.Column="2"
- Margin="0,0,0,6"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="14" />
- <!-- 列表模式的列标题的分隔线 -->
- <Rectangle
- Grid.ColumnSpan="4"
- Height="0"
- 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="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}" />
- <Rectangle
- Grid.Column="1"
- Height="1"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Bottom"
- Fill="#C5CBD3" />
- </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
- Width="{TemplateBinding Width}"
- HorizontalContentAlignment="Stretch"
- Content="{TemplateBinding Content}"
- ContentTemplate="{TemplateBinding ContentTemplate}" />
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="ListViewItemGraySelectStyle" TargetType="{x:Type ListViewItem}">
- <Setter Property="UIElement.SnapsToDevicePixels" Value="True" />
- <Setter Property="Panel.Background" Value="#F2F2F2" />
- <Setter Property="Border.BorderBrush" Value="#F2F2F2" />
- <Setter Property="Control.Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ListViewItem}">
- <Border
- Name="Bd"
- Background="{TemplateBinding Panel.Background}"
- BorderBrush="{TemplateBinding Border.BorderBrush}"
- SnapsToDevicePixels="True">
- <ContentPresenter
- Margin="0"
- HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
- Content="{TemplateBinding ContentControl.Content}"
- ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
- ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
- SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
- </Border>
- <ControlTemplate.Triggers>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="UIElement.IsMouseOver" Value="True" />
- </MultiTrigger.Conditions>
- <Setter Property="Panel.Background" Value="#d9d9d9" />
- <Setter Property="Border.BorderBrush" Value="#d9d9d9" />
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="UIElement.IsMouseOver" Value="False" />
- </MultiTrigger.Conditions>
- <Setter Property="Panel.Background" Value="#F2F2F2" />
- <Setter Property="Border.BorderBrush" Value="#F2F2F2" />
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelectionActive" Value="False" />
- <Condition Property="Selector.IsSelected" Value="True" />
- </MultiTrigger.Conditions>
- <Setter Property="Panel.Background" Value="#97D7FB" />
- <Setter Property="Border.BorderBrush" Value="#97D7FB" />
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelectionActive" Value="True" />
- <Condition Property="Selector.IsSelected" Value="True" />
- </MultiTrigger.Conditions>
- <Setter Property="Panel.Background" Value="#97D7FB" />
- <Setter Property="Border.BorderBrush" Value="#97D7FB" />
- </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>
- <ControlTemplate x:Key="AnnotationListItemStyle" TargetType="{x:Type ListBoxItem}">
- <Border
- x:Name="Bd"
- Margin="5,0,5,10"
- Padding="5"
- Background="#f5f5f5"
- BorderBrush="{TemplateBinding BorderBrush}"
- BorderThickness="{TemplateBinding BorderThickness}"
- CornerRadius="4"
- SnapsToDevicePixels="True">
- <ContentPresenter
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- Content="{TemplateBinding Content}"
- ContentStringFormat="{TemplateBinding ContentStringFormat}"
- ContentTemplate="{TemplateBinding ContentTemplate}"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
- <ControlTemplate.Triggers>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="IsMouseOver" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Bd" Property="Background" Value="#EDEEF0" />
- <Setter TargetName="Bd" Property="BorderBrush" Value="Transparent" />
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelectionActive" Value="False" />
- <Condition Property="IsSelected" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Bd" Property="Background" Value="#d7d8db" />
- <Setter TargetName="Bd" Property="BorderBrush" Value="Transparent" />
- </MultiTrigger>
- <MultiTrigger>
- <MultiTrigger.Conditions>
- <Condition Property="Selector.IsSelectionActive" Value="True" />
- <Condition Property="IsSelected" Value="True" />
- </MultiTrigger.Conditions>
- <Setter TargetName="Bd" Property="Background" Value="#d7d8db" />
- <Setter TargetName="Bd" Property="BorderBrush" Value="Transparent" />
- </MultiTrigger>
- <Trigger Property="IsEnabled" Value="False">
- <Setter TargetName="Bd" Property="TextElement.Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </ResourceDictionary>
|