This article describes what is UpdateSourceTrigger in WPF and how many types of UpdateSourceTrigger available in WPF.
UpdateSourceTrigger is a property of WPF Binding. Like INotifyPropertyChanged Interface UpdateSourceTrigger is used to notify source in Data Binding whe changes happens in target. It decides when the data should get updated between WPF objects that are binded. There are 4 different modes by which UpdateSourceTrigger can be defined:-
- Default: -If it’s a text property then data is updated during lost focus and for normal properties data updates in property change event.
- PropertyChanged: - In this setting data is updated as soon as the value is changed.
- LostFocus: - In this setting data is updated as soon as lost focus event occurs.
- Explicit: -In this setting the data is updated manually. In other words to update data between two WPF object you need to call the below code.
In this article we have discussed what is UpdateSourceTrigger in WPF and type of UpdateSourceTrigger, hope this article may helpful to you.