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

@ -146,6 +146,11 @@
<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"/> <TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="ButtonIconUpDownGeometry"/>
</StackPanel> </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> </WrapPanel>
</StackPanel> </StackPanel>
</hc:ScrollViewer> </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}"/> <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"/> <TextBlock TextAlignment="Center" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" Style="{StaticResource TextBlockDefault}" Text="RepeatButtonIconUpDownGeometry"/>
</StackPanel> </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> </WrapPanel>
</StackPanel> </StackPanel>
</hc:ScrollViewer> </hc:ScrollViewer>

View File

@ -75,19 +75,6 @@
<Setter Property="hc:IconElement.Geometry" Value="{StaticResource AddGeometry}"/> <Setter Property="hc:IconElement.Geometry" Value="{StaticResource AddGeometry}"/>
<Setter Property="Padding" Value="10"/> <Setter Property="Padding" Value="10"/>
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/> <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> </Style>
</ResourceDictionary> </ResourceDictionary>

View File

@ -64,7 +64,24 @@
</Setter> </Setter>
</Style> </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 Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="Button"> <ControlTemplate TargetType="Button">

View File

@ -59,7 +59,24 @@
</Setter> </Setter>
</Style> </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 Property="Template">
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="RepeatButton"> <ControlTemplate TargetType="RepeatButton">