When I remove this style from a button it displays properly. When I don't, it pushes all the other 开发者_C百科buttons in the row down by approx 5 pixels.
<Button.Style>
<Style TargetType="Button">
<Style.Triggers>
<DataTrigger Binding="{Binding CanUserUpdateHosts}" Value="True">
<Setter Property="IsEnabled" Value="False"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Button.Style>
If you have any implicit Styles defined for Buttons, then they will be ignored if you set the Button.Style property explicitly. So chances are you are short-circuiting another Style.
Default Styles on the other hand will still be applied.
精彩评论