开发者

Trigger not updating dependency property after value has been set in code

I have two con开发者_如何学运维trol template triggers (IsMouseOver and IsPressed). They set the Foo property correctly after the application starts. However, after i I have set Foo in code, the triggers cease to function (the set Foo is never called).

Why?


Triggers have a lower precedence than explicitly set values, if you want to set a value which should be changeable by a Trigger you can use a Setter for example.

SetCurrentValue might also work out depending on your needs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜