Possible Duplicate:
Why does the binding update without implementing INotifyPropertyChanged?
I have WPF:
<TextBlock Grid.Row="0" Text="{Binding SomeProperty}" />
<TextBox Grid.Row="1" Text="{Binding SomeProperty, UpdateSourceTrigger=PropertyChanged}" />
Bound to
class MyModel1 { string _someProperty = string.Empty; public string SomeProperty { get { return _someProperty; } set { _someProperty = value; } } }
It allso works with:
class MyModel { public string SomeProperty { get; set; } }
As You see there is no Property Change notifications, but TextBlock is updated while i am typing to TextBox. I am using Visual C# express 2010, standard WPF app project template, standard contols, no snippets, nothing additional, with .NET 4 client profile.
- Question 1: Why it works?
- Question 2: Is that new feature of .NET 4?
- Question 3: How I could get notifications about property changes from my code without implementing any events in my model?
Thank You