Introduction
This article describes what is UpdateSourceTrigger in WPF and how many types of UpdateSourceTrigger available in WPF.
Getting Started
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.
Related Articles
- WPF Style
- WPF Triggers
- Command In MVVM
- WPF INotifyPropertyChanged Interface
- Data Validation in WPF
- Resource in WPF
Summary
In this article we have discussed what is UpdateSourceTrigger in WPF and type of UpdateSourceTrigger, hope this article may helpful to you.
Thanks
Tags
wpf