更新
This commit is contained in:
@@ -1,16 +1,9 @@
|
||||
<!--
|
||||
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:controls="clr-namespace:WPFluent.Controls"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<Style x:Key="DefaultListBoxStyle" TargetType="{x:Type ListBox}">
|
||||
<Style TargetType="{x:Type ListBox}" x:Key="DefaultListBoxStyle">
|
||||
<Setter Property="Margin" Value="0" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
@@ -35,10 +28,10 @@
|
||||
<ControlTemplate TargetType="{x:Type ListBox}">
|
||||
<Grid>
|
||||
<controls:PassiveScrollViewer
|
||||
x:Name="PART_ContentHost"
|
||||
CanContentScroll="{TemplateBinding ScrollViewer.CanContentScroll}"
|
||||
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
||||
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
|
||||
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
|
||||
x:Name="PART_ContentHost">
|
||||
<ItemsPresenter />
|
||||
</controls:PassiveScrollViewer>
|
||||
</Grid>
|
||||
|
||||
@@ -1,19 +1,9 @@
|
||||
<!--
|
||||
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 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:converters="clr-namespace:WPFluent.Converters">
|
||||
|
||||
<Style x:Key="DefaultListBoxItemStyle" TargetType="{x:Type ListBoxItem}">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource ListBoxItemSelectedBackgroundThemeBrush}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ListBoxItemSelectedBackgroundThemeBrush}" />
|
||||
<Style TargetType="{x:Type ListBoxItem}" x:Key="DefaultListBoxItemStyle">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
|
||||
<Setter Property="Background" Value="{DynamicResource SystemFillColorAttentionBrush}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource SystemFillColorAttentionBrush}" />
|
||||
<Setter Property="Margin" Value="0" />
|
||||
<Setter Property="Padding" Value="12" />
|
||||
<Setter Property="Border.CornerRadius" Value="0" />
|
||||
@@ -23,22 +13,22 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
||||
<Border
|
||||
x:Name="Border"
|
||||
Margin="0"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="Transparent"
|
||||
BorderThickness="1"
|
||||
CornerRadius="{TemplateBinding Border.CornerRadius}">
|
||||
CornerRadius="{TemplateBinding Border.CornerRadius}"
|
||||
Margin="0"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
x:Name="Border">
|
||||
<ContentPresenter />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter TargetName="Border" Property="Background" Value="{DynamicResource MenuBarItemBackgroundSelected}"/>
|
||||
<Setter Property="Background" TargetName="Border" Value="{DynamicResource SubtleFillColorTertiaryBrush}" />
|
||||
</Trigger>
|
||||
|
||||
|
||||
<Trigger Property="IsSelected" Value="True">
|
||||
<Setter TargetName="Border" Property="Background" Value="{DynamicResource ListBoxItemSelectedBackgroundThemeBrush}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ListBoxItemSelectedForegroundThemeBrush}" />
|
||||
<Setter Property="Background" TargetName="Border" Value="{DynamicResource SystemFillColorAttentionBrush}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextOnAccentFillColorPrimaryBrush}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
Reference in New Issue
Block a user