style<Button>: add Style.Button.Link style for Welcome page

This commit is contained in:
leo 2021-09-13 14:34:22 +08:00
parent dd8c6423dc
commit f858d32291
2 changed files with 14 additions and 3 deletions

View file

@ -28,6 +28,17 @@
</Style.Triggers>
</Style>
<Style x:Key="Style.Button.Link" BasedOn="{StaticResource Style.Button}" TargetType="{x:Type Button}">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Opacity" Value="1"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Cursor" Value="Hand"/>
</Trigger>
</Style.Triggers>
</Style>
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource Style.Button}"/>
</ResourceDictionary>

View file

@ -52,13 +52,13 @@
Text="{DynamicResource Text.Welcome.Start}"
FontSize="13pt"/>
<StackPanel Grid.Row="1" Margin="4,12,0,0" Orientation="Vertical">
<Button Grid.Column="0" Grid.Row="0" Click="OnOpenClicked" Height="28" HorizontalAlignment="Left" BorderThickness="0" Opacity="1">
<Button Grid.Column="0" Grid.Row="0" Click="OnOpenClicked" Height="28" Style="{DynamicResource Style.Button.Link}">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Path Width="16" Height="16" Data="{StaticResource Icon.Folder.Open}" Fill="{DynamicResource Brush.Accent1}"/>
<TextBlock Margin="12,0,0,0" Text="{DynamicResource Text.Welcome.OpenOrInit}" Foreground="{DynamicResource Brush.Accent1}"/>
</StackPanel>
</Button>
<Button Grid.Column="0" Grid.Row="1" Click="OnCloneClicked" Height="28" HorizontalAlignment="Left" BorderThickness="0" Opacity="1">
<Button Grid.Column="0" Grid.Row="1" Click="OnCloneClicked" Height="28" Style="{DynamicResource Style.Button.Link}">
<StackPanel Orientation="Horizontal">
<Path Width="16" Height="16" Data="{StaticResource Icon.Pull}" Fill="{DynamicResource Brush.Accent1}"/>
<TextBlock Margin="12,0,0,0" Text="{DynamicResource Text.Welcome.Clone}" Foreground="{DynamicResource Brush.Accent1}"/>