EV: WPF按钮文字默认粗体的问题

Keywords: WPF, button, label, text, bold, font weight, fontweight, by default

.Netframework 4.5
 
Copy following codes and check the difference between applying any style and not applying:
----------------------------------------------------------------------------------
<Window x:Class="MvvmWpfApp.Views.TestUI"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="TestUI" Height="328" Width="412">
    <Grid>
        <StackPanel Margin="20">
            <Button HorizontalAlignment="Left">
                <Button.Style>
                    <Style TargetType="Button" />
                </Button.Style>
                Normal Text
            </Button>
            <Button HorizontalAlignment="Left">
                Bold Text
            </Button>
        </StackPanel>
    </Grid>
</Window>

posted on 2013-12-26 23:10  weihongji  阅读(887)  评论(0编辑  收藏  举报

导航