How to cancel an edit to an object using MVVM?

后端 未结 7 1549
既然无缘
既然无缘 2020-12-01 08:34

How can I implement cancelation of editing an object using MVVM.

For example: I have a list of customers. I choose one customer an click the button \"Edit\", a dialo

7条回答
  •  暖寄归人
    2020-12-01 08:52

    Check out the IEditableObject interface. Your Customer class should implement that, and your commands can execute BeginEdit / CancelEdit / EndEdit as appropriate.

提交回复
热议问题