This is actually not the case. DependencyProperty works by looking at many different sources of value. And as you can see here , stylists and style triggers are considered separate sources. (They are numbered 8 and 6, respectively, in the "List of dependency property priority list" section.) Whatever of the sources of active values ββwith the highest priority.
Sources of sources of one kind cannot delete the value provided by another source. The only reason triggers can change a value based on what its setter sets is because triggers have a higher priority. It is not possible to eradicate the value provided by a source with a lower priority.
The way to achieve the specific goal that you have formulated here is to invert the meaning of the trigger - do not define the style installer and activate the trigger only when IsMouseOver is false. Of course, this will not help you in all possible cases when you want to do this. But since there is no general solution, I think you need to solve each specific problem in your own way.
Ian griffiths
source share