更新
This commit is contained in:
@@ -1,18 +1,14 @@
|
||||
<!--
|
||||
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">
|
||||
<!--<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="/WPFluent;component/Themes/Light.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>-->
|
||||
<Style TargetType="{x:Type controls:Badge}">
|
||||
<Setter Property="Foreground" Value="{DynamicResource BadgeForeground}" />
|
||||
<Setter Property="Background" Value="{DynamicResource BadgeBackground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource SystemAccentBrush}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextOnAccentFillColorPrimaryBrush}" />
|
||||
<Setter Property="Background" Value="{DynamicResource SystemFillColorAttentionBrush}" />
|
||||
<!-- <Setter Property="BorderBrush" Value="{DynamicResource SystemAccentBrush}" /> -->
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="Padding" Value="4" />
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
@@ -22,47 +18,33 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type controls:Badge}">
|
||||
<Border
|
||||
x:Name="Border"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4">
|
||||
<ContentPresenter VerticalAlignment="Center"/>
|
||||
CornerRadius="4"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
x:Name="Border">
|
||||
<ContentPresenter VerticalAlignment="Center" />
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="Appearance" Value="Primary">
|
||||
<Setter Property="Foreground" Value="{DynamicResource BadgeForeground}" />
|
||||
<Trigger Property="Appearance" Value="Accent">
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextOnAccentFillColorPrimaryBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="Appearance" Value="Transparent">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ControlElevationBorderBrush}" />
|
||||
<Setter TargetName="Border" Property="Background" Value="Transparent" />
|
||||
<Setter Property="Background" TargetName="Border" Value="Transparent" />
|
||||
</Trigger>
|
||||
<Trigger Property="Appearance" Value="Secondary">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ControlElevationBorderBrush}" />
|
||||
<Setter TargetName="Border" Property="Background" Value="{DynamicResource ControlFillColorDefaultBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="Appearance" Value="Info">
|
||||
<Setter TargetName="Border" Property="Background" Value="{DynamicResource PaletteLightBlueBrush}" />
|
||||
<Trigger Property="Appearance" Value="Attention">
|
||||
<Setter Property="Background" TargetName="Border" Value="{DynamicResource SystemFillColorAttentionBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="Appearance" Value="Caution">
|
||||
<Setter TargetName="Border" Property="Background" Value="{DynamicResource PaletteOrangeBrush}" />
|
||||
<Setter Property="Background" TargetName="Border" Value="{DynamicResource SystemFillColorCautionBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="Appearance" Value="Danger">
|
||||
<Setter TargetName="Border" Property="Background" Value="{DynamicResource PaletteRedBrush}" />
|
||||
<Trigger Property="Appearance" Value="Critical">
|
||||
<Setter Property="Background" TargetName="Border" Value="{DynamicResource SystemFillColorCriticalBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="Appearance" Value="Success">
|
||||
<Setter TargetName="Border" Property="Background" Value="{DynamicResource PaletteGreenBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="Appearance" Value="Dark">
|
||||
<Setter TargetName="Border" Property="Background" Value="{DynamicResource ControlStrongFillColorDarkBrush}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextFillColorLightPrimaryBrush}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ControlElevationBorderBrush}" />
|
||||
</Trigger>
|
||||
<Trigger Property="Appearance" Value="Light">
|
||||
<Setter TargetName="Border" Property="Background" Value="{DynamicResource ControlStrongFillColorLightBrush}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextFillColorDarkPrimaryBrush}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ControlElevationBorderBrush}" />
|
||||
<Setter Property="Background" TargetName="Border" Value="{DynamicResource SystemFillColorSuccessBrush}" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
Reference in New Issue
Block a user