Name2 is a field. WPF is bound only to properties. Change it to:
public string Name2 { get; set; }
Note that with this minimal implementation, your TextBox will not respond to programmatic changes in Name2. Thus, for your timer update script, you need to implement INotifyPropertyChanged:
partial class Window1 : Window, INotifyPropertyChanged { public event PropertyChangedEventHandler PropertyChanged;
You should move this to a separate data object, and not to your Window class.
itowlson Nov 12 '09 at 21:44 2009-11-12 21:44
source share