Ok, so I have property public Person ActualPerson { get; set; }
in my code-behind. I set DataContext
like this: this.DataContext = this;
.
In XAML I have bind DataContext
in StackPanel
like this: DataContext="{Binding ActualPerson,UpdateSourceTrigger=PropertyChanged}"
. And in each TextBlock
: Text="{Binding Path=Name,UpdateSourceTrigger=PropertyChanged}"
My problem is, when I start my app I have properties form my object and all TextBlocks are filled with data, but when Person class object change, then view didn't refresh values. My Person class implement INotifyPropertyChanged
. What I'm doing wrong? Should my UserControll class implement INotifyPropertyChanged rather then Person class?