Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,819 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Try this:
private void textBox1_TextChanged( object sender, TextChangedEventArgs e )
{
if( !IsLoaded ) return;
Debug.Assert( textBox2 != null );
textBox2.Text = textBox1.Text;
}
If required, handle the Loaded event of window too:
private void Window_Loaded( object sender, RoutedEventArgs e )
{
textBox2.Text = textBox1.Text;
}