My application is WPF and I've faced up with the issue below, please show me direction in order to overcome it. Let's assume I have 3 textboxes:
<TextBox Height="23" HorizontalAlignment="Left" Margin="10,10,0,0" Name="textBox1" VerticalAlignment="Top" Width="120" />
<TextBox Height="23" HorizontalAlignment="Left" Margin="10,10,0,0" Name="textBox2" VerticalAlignment="Top" Width="120" />
<TextBox Height="23" HorizontalAlignment="Left" Margin="10,10,0,0" Name="textBox3" VerticalAlignment="Top" Width="120" />
All the textboxes will display numeric strings. The textBox1.Text is assigned in code behind, textBox2.Text is assigned by user input and what I want to is to assign textBox3.Text on textChanged of textBox2 this way:
textBox3.text = string.Format("{0:0.00}", double.Parse(textBox2.Text) - double.Parse(textBox1.Text));
Please, tell me how to achieve this?