清空WPF自带样式,以及透明按钮
- 空样式按钮
<Style x:Key="EmptyButtonStyle" TargetType="Button">
<Setter Property="Padding" Value="0"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<ContentPresenter Content="{TemplateBinding Content}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Button Width="50" Height="50" HorizontalAlignment="Left" Margin="4,0,0,0" Style="{StaticResource EmptyButtonStyle}" >
<Image Source="Styles/Images/KaraokeElibrary/button_left_normalmode.png"></Image>
</Button>
- 透明样式按钮
<Style x:Key="TransparentButtonStyle" TargetType="Button">
<Setter Property="Padding" Value="0"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid Background="Transparent"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>