February 2015
Intermediate to advanced
768 pages
26h 24m
English
Initiating the contact picker user interface looks just like initiating the file picker on a PC. You can use a ContactPicker class from the Windows.ApplicationModel.Contacts namespace as follows:
// Get a contact from the user ContactPicker picker = new ContactPicker(); Contact contact = await picker.PickContactAsync();
The resultant picker is shown in Figure 21.10. This enables the user to pick a contact to provide to your app. You don’t get to access the entire contacts database yourself. (There is a capability for such a thing, but it’s phone-specific.) You can, however, ask the user to pick several contacts by calling PickContactsAsync instead.
FIGURE 21.10 The Contact Picker ...
Read now
Unlock full access