WPF button 圆角制作

将以下节点复制到app.xaml的<Application.Resources>节点下

<Style TargetType="{x:Type Button}">
            <Setter Property="OverridesDefaultStyle" Value="true"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Border Name="Border" Background="{TemplateBinding Control.Background}">
                            <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"
                                      Content="{TemplateBinding ContentControl.Content}" />
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

原文地址:https://www.cnblogs.com/renzhendewo/p/3160418.html