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

透明样式按钮

<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>
posted @ 2013-01-09 19:35  双魂人生  阅读(4508)  评论(0编辑  收藏  举报