简体   繁体   中英

ApiController as WPF ViewModelBase

Can I use ApiController as ViewModelBase in the WPF app?

If yes , How can I handle bindings validation etc ... ?

Thanks.

You could but that makes no sense. ApiController is Web technology, WPF is desktop technology.

Why Not ApiController:

  • It is in System.Web.Http - why do you need this dependency for desktop application
  • It inherits IHttpController - this is not a desktop technology - you are dragging in lot of concepts that have nothing to do with how desktop applications process information
  • Does not have any idea about IPropertyNotifyChange which what ViewModelBase from MVVM Light toolkit has to enable property notification changes

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM