Converting a Stored Contact to and from a vCard

vCard is a standard file format used for electronic business cards. The stored contact API allows you to convert a StoredContact to and from a vCard.

The ContactInformation class contains a ParseVcardAsnc method, which asynchronously converts an IInputStream of vCard data and then returns a populated ContactInformation object, as demonstrated by the following example:

ContactStore store = await ContactStore.CreateOrOpenAsync();ContactInformation contactInformation    = await ContactInformation.ParseVcardAsync(inputStream);StoredContact contact = new StoredContact(store, contactInformation);

Conversely, a StoredContact object is converted to an IInputStream of vCard ...

Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.