空样式按钮

<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"></

透明样式按钮

<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>

相关文章:

  • 2022-02-13
  • 2021-09-27
  • 2022-01-05
  • 2021-08-07
  • 2019-07-30
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-18
  • 2021-05-26
  • 2021-08-10
  • 2022-12-23
相关资源
相似解决方案