开发者

TextBox.TextChanged Event/ComboBox.TextInput Event through MVVM-commanding

I'm finding for last 2 days about the attached-command-behaviour firing TextBox.TextChanged Event or ComboBox.TextInput Event through Commanding. But, I can't get any proper solution for this.

开发者_如何学运维

One of the solution, I got was calling the desired method on UpdateSourceTrigger=PropertyChanged by binding the Text to ViewModel property.

But, according to the findings on MVVM, property should not hold anyother code other than getter and setter of private member including OnPropertyChanged.

so, can anyone help me on this, guide me whether i'm going in a right direction or not. Or missing something somewhere.

A detailed explanation or links or sample code will be highly appreciated.

Enjoy Coding, VJ


But, according to the findings on MVVM, property should not hold anyother code other than getter and setter of private member including OnPropertyChanged.

What makes you think that? It's fine to have any code you want in the setter... Anyway, it's much easier than using an attached behavior

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜