WPF Caliburn Micro CanExecute when property of binded object changes

天大地大妈咪最大 提交于 2019-12-05 20:52:52

The problem you are having is that changing a property of the book does not raise INotifyPropertyChange on the view model. Easiest would be to get rid of the Book class and put the Name, Price, ISBN properties straight in the view model. Then raise INotifyPropertyChange in the setters (and make sure that the binding is two-way).

You can then construct the Book in the SaveBook method and call your service with it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!