Data binding supports three modes for binding: one way, two way, and one time. Up until now the binding occurred when the page first loads and remains unchanged after that. What happens if we change a property value on a
Person object after the bindings are in place?
After adding a simple button, the
Click event handler does the following:
auto person = (Person^)this->Resources->Lookup("p1"); person->BirthYear++;
Person instance was defined as a resource (uncommon, but possible), it's extracted from the
Resources property of the page by using the specified key (
p1). Then the
BirthYear property is incremented.
Running the application shows no visual change. Setting a breakpoint in the
Click handler confirms it's actually ...