Data binding

There are also a number of performance improvements that we can make when data binding in our applications. The simplest of which can be obtained by simply setting the Binding.Mode property correctly. In order to make data binding possible, the Framework attaches handlers to listen out for changes to our data bound properties.

For two-way bindings, event handlers will be attached to the PropertyChanged event of the INotifyPropertyChanged interface to listen to changes in our data model objects or View Models and to various other XxxChanged events in the relevant binding target controls to listen to UI-based property changes.

When we only require one way bindings, we can save some computing resources by setting the Mode property of the ...

Get Mastering Windows Presentation Foundation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.