How come I don't need to implement the INotifyPropertyChanged interface in order for the UI to update in this example?
<Window.DataContext>
<local:TheModel/>
</Window.DataContext>
<StackPanel>
<TextBox Text="{Binding FirstName}" />
<Label Content="{Binding FirstName}" />
<TextBox Text="{Binding FirstName}" />
</StackPanel>
Let's say I type something in the first TexBox, as soon as the control loses focus, it updates the Content and Text property of the Label and the other TextBox to the corresponding value that was set in the first TextBox.
I thought the whole idea behind INPC was to update the UI, but it seems to be working just fine without it.
class TheModel
{
private string _firstName;
public string FirstName
{
get { return _firstName; }
set { _firstName = value;
}
}
}