Inheritance: INotifyPropertyChanged
コード例 #1
0
        public MainWindow()
        {
            InitializeComponent();
            var person = new Person();
            person.PropertyChanged +=PropertyChanged;
            DataContext = person;

            new Thread(() => SetPropertyOnOtherThread(person)).Start();
        }
コード例 #2
0
 private void SetPropertyOnOtherThread(Person person)
 {
     Thread.Sleep(5000);
     person.Name = "BGThread";
 }