chr
2024-08-30 3d4d3fc5b2ef7fc3904e2e79f0c0896241919958
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <FontFamily x:Key="iconfont">
        /PdmSwPlugin.Common;component/Image/IconFont/#iconfont
    </FontFamily>
 
    <Style x:Key="LinkButton" TargetType="{x:Type Button}" >
        <Style.Resources>
            <SolidColorBrush x:Key="TextColor">Blue</SolidColorBrush>
        </Style.Resources>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type ButtonBase}">
                    <ContentPresenter x:Name="buttonContent" TextBlock.FontSize="{TemplateBinding FontSize}" 
                        TextBlock.FontFamily="{StaticResource iconfont}" 
                        TextBlock.Foreground="{StaticResource TextColor}" 
                        Margin="0,0,5,0"
                        VerticalAlignment="Center" 
                        HorizontalAlignment="Center"
                        Content="{TemplateBinding Content}"/>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="buttonContent" Property="TextBlock.Foreground" Value="Purple"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>