Using the current theme's FocusVisualStyle
-
Hello, If I create a style and set
OverridesDefaultStyle
totrue
, or if I create a new control were I am defining the default style myself, it seems thatFocusVisualStyle
is always null (by default). Which means the I need to set it in the style, which is Ok. My problem is, I want to use the same FocusVisualStyle that the current theme is using, as is the recomendation, and I believe that it should be available through the static propertySystemParameters.FocusVisualStyleKey
. However, when I try to use it, nothing happens (no focus rectangle is displayed). I believe I am writing this correctly:<Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" />
If I define my own FocusVisualStyle and use it, it works, but then that defeats the purpose of the Theme. Does anyone have any insights into this? Thanks in advance.