简体   繁体   中英

How to access ContactStore in Shared project

Contact Store which is in Windows.ApplicationModel is accessable in windows phone 8.1 project but it is not accessible in my View model which is in my shared project. Does anyone know how to access this in shared project?

You can just use Conditional Compilation Constants inside the Shared Project

#if WINDOWS_APP
     //do your logic here
#else
     //do windows phone logic here
#endif

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