Cancelling Two Way Data Binding In Silverlight

Posted by DaveB on Stack Overflow See other posts from Stack Overflow or by DaveB
Published on 2009-07-21T19:02:23Z Indexed on 2010/05/27 19:01 UTC
Read the original article Hit count: 242

Filed under:

I have an ObervableCollection of data items. This collection is bound to a ListBox. When the user selects a item from the listbox and clicks the Edit button a UserControl with the details of that item is displayed with the various properties bound to text boxes. Each binding mode is set for TwoWay. On this details UserControl, I would like to implement 2 buttons, OK and Cancel. This would be consistent with UIs in Windows. This application is using the Model-View_ViewModel pattern. Here is my question:

1) How can I implement the Cancel button when all the changes have already been committed?

© Stack Overflow or respective owner

Related posts about silverlight-2.0