我只是不明白为什么我的代码不起作用。我只想改变一个按钮的边框,我看到有人在使用TargetType="{x:Type Button}",它不能满足我的要求!Set CornerRadius on button template中的答案解释了如何更改CornerRadius,我知道如何更改CornerRadius,但我真的不知道为什么我的代码不能只为一个按钮工作。
<Button Content="OK" BorderThickness="1">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="10"/>
</Style>
</Button.Resources>
</Button>发布于 2017-05-02 12:29:12
看来你是个新手,我建议你把按钮拆开,学习如何改变边框。
https://stackoverflow.com/questions/43648293
复制相似问题