更新
This commit is contained in:
@@ -1,39 +1,32 @@
|
||||
<!--
|
||||
This Source Code Form is subject to the terms of the MIT License.
|
||||
If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
|
||||
Copyright (C) Leszek Pomianowski and WPF UI Contributors.
|
||||
All Rights Reserved.
|
||||
-->
|
||||
|
||||
<ResourceDictionary
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:WPFluent.Controls"
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib">
|
||||
|
||||
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<system:Double x:Key="ListViewItemMinHeight">32</system:Double>
|
||||
|
||||
<ControlTemplate x:Key="NullViewItemTemplate" TargetType="{x:Type controls:ListViewItem}">
|
||||
|
||||
<ControlTemplate TargetType="{x:Type controls:ListViewItem}" x:Key="NullViewItemTemplate">
|
||||
<Border
|
||||
x:Name="Border"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
Background="Transparent"
|
||||
BorderThickness="1"
|
||||
CornerRadius="{TemplateBinding Border.CornerRadius}">
|
||||
CornerRadius="{TemplateBinding Border.CornerRadius}"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
x:Name="Border">
|
||||
<Grid>
|
||||
<ContentPresenter Margin="{TemplateBinding Padding}" />
|
||||
<Rectangle
|
||||
x:Name="ActiveRectangle"
|
||||
Width="3"
|
||||
Fill="{DynamicResource SystemFillColorAttentionBrush}"
|
||||
Height="18"
|
||||
Margin="0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Fill="{DynamicResource ListViewItemPillFillBrush}"
|
||||
Margin="0"
|
||||
RadiusX="2"
|
||||
RadiusY="2"
|
||||
Visibility="Collapsed" />
|
||||
VerticalAlignment="Center"
|
||||
Visibility="Collapsed"
|
||||
Width="3"
|
||||
x:Name="ActiveRectangle" />
|
||||
</Grid>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
@@ -42,41 +35,41 @@
|
||||
<Condition Property="IsEnabled" Value="True" />
|
||||
<Condition Property="IsMouseOver" Value="True" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter TargetName="Border" Property="Background" Value="{DynamicResource ListViewItemBackgroundPointerOver}" />
|
||||
<Setter Property="Background" TargetName="Border" Value="{DynamicResource SubtleFillColorSecondaryBrush}" />
|
||||
</MultiTrigger>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter TargetName="ActiveRectangle" Property="Visibility" Value="Visible" />
|
||||
<Setter TargetName="Border" Property="Background" Value="{DynamicResource ListViewItemBackgroundPointerOver}" />
|
||||
<Setter Property="Visibility" TargetName="ActiveRectangle" Value="Visible" />
|
||||
<Setter Property="Background" TargetName="Border" Value="{DynamicResource SubtleFillColorSecondaryBrush}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
<ControlTemplate x:Key="GridViewItemTemplate" TargetType="{x:Type controls:ListViewItem}">
|
||||
<ControlTemplate TargetType="{x:Type controls:ListViewItem}" x:Key="GridViewItemTemplate">
|
||||
<Border
|
||||
x:Name="Border"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
Background="Transparent"
|
||||
BorderBrush="{TemplateBinding Border.BorderBrush}"
|
||||
BorderThickness="{TemplateBinding Border.BorderThickness}"
|
||||
CornerRadius="{TemplateBinding Border.CornerRadius}">
|
||||
CornerRadius="{TemplateBinding Border.CornerRadius}"
|
||||
Margin="0"
|
||||
Padding="0"
|
||||
x:Name="Border">
|
||||
<Grid>
|
||||
<controls:GridViewRowPresenter
|
||||
Margin="{TemplateBinding Padding}"
|
||||
VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
|
||||
Columns="{TemplateBinding GridView.ColumnCollection}"
|
||||
Content="{TemplateBinding ContentControl.Content}" />
|
||||
Content="{TemplateBinding ContentControl.Content}"
|
||||
Margin="{TemplateBinding Padding}"
|
||||
VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" />
|
||||
<Rectangle
|
||||
x:Name="ActiveRectangle"
|
||||
Width="3"
|
||||
Fill="{DynamicResource SystemFillColorAttentionBrush}"
|
||||
Height="18"
|
||||
Margin="0"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center"
|
||||
Fill="{DynamicResource ListViewItemPillFillBrush}"
|
||||
Margin="0"
|
||||
RadiusX="2"
|
||||
RadiusY="2"
|
||||
Visibility="Collapsed" />
|
||||
VerticalAlignment="Center"
|
||||
Visibility="Collapsed"
|
||||
Width="3"
|
||||
x:Name="ActiveRectangle" />
|
||||
</Grid>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
@@ -85,17 +78,17 @@
|
||||
<Condition Property="IsEnabled" Value="True" />
|
||||
<Condition Property="IsMouseOver" Value="True" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter TargetName="Border" Property="Background" Value="{DynamicResource ListViewItemBackgroundPointerOver}" />
|
||||
<Setter Property="Background" TargetName="Border" Value="{DynamicResource SubtleFillColorSecondaryBrush}" />
|
||||
</MultiTrigger>
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter TargetName="ActiveRectangle" Property="Visibility" Value="Visible" />
|
||||
<Setter TargetName="Border" Property="Background" Value="{DynamicResource ListViewItemBackgroundPointerOver}" />
|
||||
<Setter Property="Visibility" TargetName="ActiveRectangle" Value="Visible" />
|
||||
<Setter Property="Background" TargetName="Border" Value="{DynamicResource SubtleFillColorSecondaryBrush}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
<Style x:Key="ListViewItemStyle" TargetType="{x:Type controls:ListViewItem}">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ListViewItemForeground}" />
|
||||
<Style TargetType="{x:Type controls:ListViewItem}" x:Key="ListViewItemStyle">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Border.CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
|
||||
<Setter Property="Margin" Value="0,0,0,2" />
|
||||
|
||||
Reference in New Issue
Block a user