J W
J W

Reputation: 1720

Change the FocusVisualStyle in the entire application

While making a WPF application I would like to change the default FocusVisualStyle (the black "marching ants" border) to something else, like for example a blue border. I would like to make this change for every control on the entire application. Is there an easier way then changing the default style for every type of control?

Thanks

Upvotes: 4

Views: 2019

Answers (1)

Cameron MacFarland
Cameron MacFarland

Reputation: 71916

Unfortunately there's no easy way to apply a style to all controls. The main issue is that by default WPF only allows one style per control.

You can get around this, but it requires redefining the styles of all the controls anyway.

See this question for more info: How to apply multiple styles in WPF

Upvotes: 2

Related Questions