I have a text field, depending on the value of the text field. I need to enable / disable other text fields. I am using the MVVM pattern.
So here is my problem: whenever I enter some text in TextBox1, Setter for TextBox1 starts and I can check if there will be a loop, regardless of whether the valus value exists, and I will turn off the other text fields. Now that there is one value in the text field, say "9", and I delete / cancel it, the Set event does not fire to include other text fields.
View:
<TextBox Text = {Binding TextBox1 , UpdateSourceTrigger = PropertyChanged,Mode= TwoWay}/> <TextBox Text = {Binding TextBox2 , UpdateSourceTrigger = PropertyChanged,Mode= TwoWay}/> <TextBox Text = {Binding TextBox3 , UpdateSourceTrigger = PropertyChanged,Mode= TwoWay}/>
Show model:
private int_textBox1; public int TextBox1 { get {return _textBox1;} set { _textBox1= value; if(value > 0) {
source share