开发者

UpdateSourceTrigger PropertyChanged in Silverlight?

I am sure most of you have come across this when you type in a textbox you like instantly to filter a ViewCollection acco开发者_C百科rding to has been typed.

Its very straight forward in WPF, just change the UpdateSourceTrigger for Text binding to PropertyChanged.

As you would expect Silverlight doesnt have it. There is just a default and explicit instead.

I had the idea to bind an Interaction behavior to TextChanged event of the textbox instead. Would you recommend this approach or is there a better way?


A behavior is the way it was solved on my team, and I think is the generally accepted method. I have also seen articles solving it with Attached Properties (might be cleaner XAML syntax, but I have never tried it). These are the first links that came up, completely untested by me (should be easy enough to find others):

Behavior

Attached Property

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜