更新
This commit is contained in:
@@ -1,18 +1,11 @@
|
||||
<!--
|
||||
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="DefaultUiThumbRateStyle" TargetType="{x:Type controls:ThumbRate}">
|
||||
<Style TargetType="{x:Type controls:ThumbRate}" x:Key="DefaultUiThumbRateStyle">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource ThumbRateForeground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource SystemFillColorAttentionBrush}" />
|
||||
<Setter Property="FontSize" Value="24" />
|
||||
<Setter Property="Focusable" Value="False" />
|
||||
<Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
|
||||
@@ -28,37 +21,37 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<controls:Button
|
||||
Grid.Column="0"
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
Command="{Binding Path=TemplateButtonCommand, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
CommandParameter="{x:Static controls:ThumbRateState.Liked}"
|
||||
Foreground="{TemplateBinding Foreground}">
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Grid.Column="0">
|
||||
<controls:SymbolIcon
|
||||
x:Name="ThumbsUpButtonIcon"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
Symbol="ThumbLike24" />
|
||||
Symbol="ThumbLike24"
|
||||
x:Name="ThumbsUpButtonIcon" />
|
||||
</controls:Button>
|
||||
|
||||
<controls:Button
|
||||
Grid.Column="1"
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
Command="{Binding Path=TemplateButtonCommand, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}"
|
||||
CommandParameter="{x:Static controls:ThumbRateState.Disliked}"
|
||||
Foreground="{TemplateBinding Foreground}">
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Grid.Column="1">
|
||||
<controls:SymbolIcon
|
||||
x:Name="ThumbsDownButtonIcon"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
Symbol="ThumbDislike24" />
|
||||
Symbol="ThumbDislike24"
|
||||
x:Name="ThumbsDownButtonIcon" />
|
||||
</controls:Button>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="State" Value="Liked">
|
||||
<Setter TargetName="ThumbsUpButtonIcon" Property="Filled" Value="True" />
|
||||
<Setter Property="Filled" TargetName="ThumbsUpButtonIcon" Value="True" />
|
||||
</Trigger>
|
||||
<Trigger Property="State" Value="Disliked">
|
||||
<Setter TargetName="ThumbsDownButtonIcon" Property="Filled" Value="True" />
|
||||
<Setter Property="Filled" TargetName="ThumbsDownButtonIcon" Value="True" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
Reference in New Issue
Block a user