Suppose I want to databinding two TextBox. I can do it in XAML:
<TextBox x:Name="FirstBox" Text="{Binding Text, Mode=TwoWay, ElementName= SecondBox}"></TextBox>
<TextBox x:Name="SecondBox"></TextBox>
Or, I can do it programmatically.
Binding binding = new Binding("Text");
binding.Mode = BindingMode.TwoWay;
binding.Source = SecondBox;
FirstBox.SetBinding(TextBox.TextProperty, binding);
The problem is, when I type something in SecondBox, it immediately reflects in FirstBox. However, typing in FirstBox doesn't show in SecondBox immediately. SecondBox is updated only when focus out FirstBox.
Surely, I can build another Binding for SecondBox. But, is there any other way to make change in FirstBox immediately update SecondBox?