Reputation: 26766
I'm trying to style some buttons in Wpf. The only thing I actually want to change is the colours used for the hover/click/focused effects.
All the tutorials I've found rely on replacing the template for the button entirely. This is great if you want to change everything about the button; However, if all you want to do is change some colours it's a monumental undertaking to reimplement properly.
The default control gives a lot of functionality for free (animations, UI automation/accessibility, tested in multiple localisations, etc). Making it look like the original is tedious enough, but making it function the same way is near impossible.
So... Instead of trying to reinvent the wheel, is it possible to load the default template, modify it and then apply the modified version? Doing this in xaml as opposed to C# would be preferable.
Upvotes: 1
Views: 31
Reputation: 292355
I had the same issue a few years ago, and I came up with this solution.
Hope this helps.
Upvotes: 1