У меня есть TextBox
es, которые все связаны со строковым свойством TheText
в ViewModel
<TextBox x:Name="t1" Text="{Binding TheText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<TextBox x:Name="t2" Text="{Binding TheText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
<TextBox x:Name="t3" Text="{Binding TheText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
ViewModel:
string theString = String.Empty;
public string TheText
{
get { return this.theString; }
set
{
if (this.theString != value)
{
this.RaisePropertyChanged();
this.theString = value;
}
}
}
Я пытаюсь сделатьследующее:
if(something)
then bind only t1 and t2 and cancel binding of t3
Возможно ли это?