c# - how to get email, display name, number using the phone number chooser task for Windows Phone 8 -


I am trying to get an email, display name and mobile number phone number selector function but it only s display name and In the number of calls I also want to return the email well. This can be done by the email address selector for Windows Phone 8, but compared to this, this phone number will not be given so that it can be obtained.

Data from one of those seeds You must find the contact list given to the output and the matching entry you want all the information.

Then use the PhoneNumberChooserTask

  with the example. Use of Microsoft phone. Task; Using Microsoft.Phone.UserData; // Phone number number to choose the phone number number; Phone number number; PhoneNumberChooserTask = New PhoneNumberChooserTask (); PhoneNumberChooserTask.Completed + = New EventHeader & lt; PhoneNumberResult & gt; (PhoneNumberChooserTask_Completed); PhoneNumberChooserTask.Show (); // The user has chosen zero from the list, phone number numberuscursetc_compiled (object sender, phoneNumberResult e) {if (e.TaskResult == TaskResult.OK) {// At this point, we call the phone number and display name only We know that we can search all contacts for the same phone number and display name // Create search, we are going to filter by display name and contact according to the third variable (state) contacts before the phone number = new contact Date (); Cons.SearchCompleted + = New Event Handler & lt; ContactsSearchEventArgs & gt; (Contacts_SearchCompleted); Cons.SearchAynync (E. DisplayName, FilterCand.DispellName, E.PhoneNumber); }} // search is complete // We want to use some LINQ and we want to select matching data (Magic .. I know) Zero contacts detected (object sender, ContactsSearchEventArgs e) {contactcontact = Null; // query var q = Contact in contact. In contact with PN Select the phone number where pn.PhoneNumber.Equals (String) e.State, StringComparison.InvariantCultureIgnoreCase); // Loop through all matches (should be 1, if any) foreach (contact in Q) {// contact complete contact = C; } // The complete contact should be included at this point if the phone number / email does not have tap // loop (usually they will be 1/1 (unless you actually keep your contact up to date Do not like) (full contact! = Null) {MessageBox.Show (fullcontact.DisplayName); // Loop phone numbers foreach (contactcontact.phoneNumbers in contactphone number CPN) {MessageBox.Show (cpn.PhoneNumber);} // Loop email foreach (fullContact.EmailAddresses in ContactEmailAddress CEA) {MessageBox.Show (cea.EmailAddress);}}}  

Comments