a FocusVisualStyle allows you to visualize user feedback while focusing control . For example, adding a Rectangle that looks like the border of a control.
A Style is the appearance of the control itself. All this explains here .
FocusVisualStyle not a style for Button itself; it is a style when Button focused.
See here for more details.
I think you are after Trigger .
<Style x:Key="buttonStyle" TargetType="{x:Type Button}"> <Style.Triggers> <Trigger Property="IsFocused" Value="True"> <Setter Property="Background" Value="Magenta"/> </Trigger> </Style.Triggers> </Style>
Then you can set the Style your Button , for example:
<Button Style="{StaticResource buttonStyle}" ... />
source share