modified ButtonIconCircular style

This commit is contained in:
NaBian 2020-07-08 23:35:16 +08:00
parent e2d4b87a0c
commit d637308cca
5 changed files with 47 additions and 16 deletions

View File

@ -143,9 +143,14 @@
</StackPanel>
<StackPanel>
<Button Width="50" Padding="16,8" Margin="5" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource PrimaryTextBrush}" hc:IconElement.Geometry="{StaticResource UpDownGeometry}"/>
<Button Width="50" Padding="16,8" IsEnabled="False" Margin="5" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource PrimaryTextBrush}" hc:IconElement.Geometry="{StaticResource UpDownGeometry}"/>
<Button Width="50" Padding="16,8" IsEnabled="False" Margin="5" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource PrimaryTextBrush}" hc:IconElement.Geometry="{StaticResource UpDownGeometry}"/>
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonIconUpDownGeometry"/>
</StackPanel>
<StackPanel>
<Button Padding="7" Margin="5" Style="{StaticResource ButtonIconCircular}" Foreground="{DynamicResource PrimaryTextBrush}" hc:IconElement.Geometry="{StaticResource UpDownGeometry}"/>
<Button Padding="7" IsEnabled="False" Margin="5" Style="{StaticResource ButtonIconCircular}" Foreground="{DynamicResource PrimaryTextBrush}" hc:IconElement.Geometry="{StaticResource UpDownGeometry}"/>
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonIconCircularUpDownGeometry"/>
</StackPanel>
</WrapPanel>
</StackPanel>
</hc:ScrollViewer>

View File

@ -146,6 +146,11 @@
<RepeatButton Width="50" Padding="16,8" IsEnabled="False" Margin="5" Style="{StaticResource RepeatButtonIcon}" Foreground="{DynamicResource PrimaryTextBrush}" hc:IconElement.Geometry="{StaticResource UpDownGeometry}"/>
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="RepeatButtonIconUpDownGeometry"/>
</StackPanel>
<StackPanel>
<RepeatButton Padding="7" Margin="5" Style="{StaticResource RepeatButtonIconCircular}" Foreground="{DynamicResource PrimaryTextBrush}" hc:IconElement.Geometry="{StaticResource UpDownGeometry}"/>
<RepeatButton Padding="7" IsEnabled="False" Margin="5" Style="{StaticResource RepeatButtonIconCircular}" Foreground="{DynamicResource PrimaryTextBrush}" hc:IconElement.Geometry="{StaticResource UpDownGeometry}"/>
<TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="RepeatButtonIconCircularUpDownGeometry"/>
</StackPanel>
</WrapPanel>
</StackPanel>
</hc:ScrollViewer>

View File

@ -75,19 +75,6 @@
<Setter Property="hc:IconElement.Geometry" Value="{StaticResource AddGeometry}"/>
<Setter Property="Padding" Value="10"/>
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/>
<Setter Property="FocusVisualStyle">
<Setter.Value>
<Style>
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Style="{StaticResource RectangleFocusVisualCircular}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

View File

@ -64,7 +64,24 @@
</Setter>
</Style>
<Style x:Key="ButtonIconCircular" BasedOn="{StaticResource ButtonIcon}" TargetType="Button">
<Style x:Key="ButtonIconCircular" BasedOn="{StaticResource ButtonBaseStyle}" TargetType="Button">
<Setter Property="Width" Value="{StaticResource DefaultControlHeight}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="hc:BorderElement.CornerRadius" Value="0"/>
<Setter Property="FocusVisualStyle">
<Setter.Value>
<Style>
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Style="{StaticResource RectangleFocusVisualCircular}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">

View File

@ -59,7 +59,24 @@
</Setter>
</Style>
<Style x:Key="RepeatButtonIconCircular" BasedOn="{StaticResource RepeatButtonIcon}" TargetType="RepeatButton">
<Style x:Key="RepeatButtonIconCircular" BasedOn="{StaticResource RepeatButtonBaseStyle}" TargetType="RepeatButton">
<Setter Property="Width" Value="{StaticResource DefaultControlHeight}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="hc:BorderElement.CornerRadius" Value="0"/>
<Setter Property="FocusVisualStyle">
<Setter.Value>
<Style>
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<Rectangle Style="{StaticResource RectangleFocusVisualCircular}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RepeatButton">