【发布时间】:2011-06-05 07:36:03
【问题描述】:
<Style x:Key="MyStyle">
<Setter Property="Window.Background" Value="Orange"/>
</Style>
<Button Content="Ok" Style="{StaticResource MyStyle}"/>
如果 setter 被指定为 Window.Background,为什么按钮实际上是橙色背景?
这不会给 TextBlock 一个橙色背景:
<TextBlock Style="{StaticResource MyStyle}"/>
谢谢
【问题讨论】: