|
| 1 | +<!--- |
| 2 | + category: ContactsAndCalendar |
| 3 | +---> |
| 4 | + |
| 5 | +# Contact cards sample |
| 6 | + |
| 7 | +This sample shows how to show contact cards using methods of the |
| 8 | +[**ContactManager**](https://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.contacts.contactmanager.aspx) |
| 9 | +class. |
| 10 | + |
| 11 | +This sample has three scenarios. |
| 12 | + |
| 13 | +- **Show mini contact card** |
| 14 | + |
| 15 | + Mini contact cards appear as a pop-up window inside the app. |
| 16 | + Apps provide an anchor rectangle around which the mini card will be displayed |
| 17 | + and can provide a suggested position of the mini contact card relative to the anchor rectangle. |
| 18 | + The [**ShowContactCard**](https://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.contacts.contactmanager.showcontactcard.aspx) |
| 19 | + method displays a mini contact card. |
| 20 | + |
| 21 | +- **Show mini contact card with delay loaded-data** |
| 22 | + |
| 23 | + Display the mini contact card immediately |
| 24 | + while the app obtains additional information about the contact in the background. |
| 25 | + The card is updated when the additional information is available. |
| 26 | + The [**ShowDelayLoadedContactCard**](https://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.contacts.contactmanager.showdelayloadedcontactcard.aspx) |
| 27 | + method displays a delay loaded mini contact card. |
| 28 | + |
| 29 | +- **Show full contact card** |
| 30 | + |
| 31 | + Full contact cards appear as a separate window. |
| 32 | + The [**ShowFullContactCard**](https://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.contacts.contactmanager.showfullcontactcard.aspx) |
| 33 | + method displays a full contact card. |
| 34 | + |
| 35 | +Not all devices support mini contact cards. |
| 36 | +The samples also demonstrate how to detect support for mini contact cards. |
| 37 | + |
| 38 | +**Note** The Universal Windows app samples require Visual Studio 2015 to build and Windows 10 to execute. |
| 39 | + |
| 40 | +To obtain information about Windows 10, go to [Windows 10](http://go.microsoft.com/fwlink/?LinkID=532421) |
| 41 | + |
| 42 | +To obtain information about Microsoft Visual Studio 2015 and the tools for developing Windows apps, go to [Visual Studio 2015](http://go.microsoft.com/fwlink/?LinkID=532422) |
| 43 | + |
| 44 | +## Related topics |
| 45 | + |
| 46 | +### Reference |
| 47 | + |
| 48 | +[**Contact**](http://msdn.microsoft.com/library/windows/apps/br224849) |
| 49 | + |
| 50 | +[**ContactCardDelayedDataLoader**](http://msdn.microsoft.com/library/windows/apps/dn297400) |
| 51 | + |
| 52 | +[**Windows.ApplicationModel.Contacts**](http://msdn.microsoft.com/library/windows/apps/br225002) |
| 53 | + |
| 54 | +[**Windows.ApplicationModel.Contacts.Provider**](http://msdn.microsoft.com/library/windows/apps/br225014) |
| 55 | + |
| 56 | +## System requirements |
| 57 | + |
| 58 | +**Client:** Windows 10 |
| 59 | + |
| 60 | +**Server:** Windows Server 2016 Technical Preview |
| 61 | + |
| 62 | +**Phone:** Windows 10 (full contact cards only) |
| 63 | + |
| 64 | +## Build the sample |
| 65 | + |
| 66 | +1. If you download the samples ZIP, be sure to unzip the entire archive, not just the folder with the sample you want to build. |
| 67 | +2. Start Microsoft Visual Studio 2015 and select **File** \> **Open** \> **Project/Solution**. |
| 68 | +3. Starting in the folder where you unzipped the samples, go to the Samples subfolder, then the subfolder for this specific sample, then the subfolder for your preferred language (C++, C#, or JavaScript). Double-click the Visual Studio 2015 Solution (.sln) file. |
| 69 | +4. Press Ctrl+Shift+B, or select **Build** \> **Build Solution**. |
| 70 | + |
| 71 | +## Run the sample |
| 72 | + |
| 73 | +The next steps depend on whether you just want to deploy the sample or you want to both deploy and run it. |
| 74 | + |
| 75 | +### Deploying the sample |
| 76 | + |
| 77 | +- Select Build > Deploy Solution. |
| 78 | + |
| 79 | +### Deploying and running the sample |
| 80 | + |
| 81 | +- To debug the sample and then run it, press F5 or select Debug > Start Debugging. To run the sample without debugging, press Ctrl+F5 or select Debug > Start Without Debugging. |
0 commit comments