Question

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

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top