Showing posts from April, 2006

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.