I often reference Adam Nathan‘s excellent Windows Presentation Foundation Unleashed. If you do any WPF development, you should definitely pick up a copy.
The following is from that book, and I’m posting it just to save me from having to find the table at the bottom of page 57 every time I need to know this:
Dependency property base values are determined using the following precedence:
- Local value
- Style triggers
- Template triggers
- Style setters
- Theme style triggers
- Theme style setters
- Property value inheritance
- Default value
That means when a style trigger doesn’t work, make sure you aren’t setting a local value. If you are, use a style setter instead.