WPF: Binding updates

Whenever you offer a Cancel Changes command you need to delay updates to the Source until the user Accepts Changes e.g. by clicking OK or Save.

Although WPF's two way bindings update the source immediately you can delay the update by adding UpdateSourceTrigger=Explicit to your binding expression.

{Binding Path=Text, UpdateSourceTrigger=Explicit}


The Source won't be updated until you call BindingExpression.UpdateSource.

Comments

Popular posts from this blog

Custom Chrome in WPF

Capture WebCam with WinForms2