I am working on an MVVM application and have a view that is used to change a number of network parameters (IP, SubnetMask, etc.).
The view contains a number of text fields bound to properties in NetworkConfigViewModel:
<TextBox>
<TextBox.Text>
<Binding Path="IP" UpdateSourceTrigger="PropertyChanged"/>
</TextBox.Text>
</TextBox>
... etc
The view also contains a button with a name Save Configuration. The button is bound to the RelayCommand in the ViewModel, which will take care of saving the configuration to the remote device upon request.
I would like to change the bindings of the text fields to use UpdateSourceTrigger="Explicit"so that the ViewModel is updated only when the user explicitly clicks “Save Configuration” and not updates as the values change.
, BindingExpression.UpdateSource() . MVVM? RelayCommand ViewModel, , .