<Style x:Key="TransparentButton" TargetType="Button">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border Background="{TemplateBinding Background}">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Opacity" Value="0.8"/>
</Trigger>
</Style.Triggers>
</Style>
<Button Style="{StaticResource TransparentButton}" Content=""
FontFamily="./Resource/fonts/#iconfont"
/>
标签:样式,取消,wpf,默认,按钮
From: https://www.cnblogs.com/gyl0812/p/18539372