Inheritance: IContactPickerUI
 /// <summary>
 /// Activates ContactPickerPage.
 /// </summary>
 /// <param name="args">ContactPicker activated args</param>
 public void Activate(ContactPickerActivatedEventArgs args)
 {
     this.contactPickerUI = args.ContactPickerUI;
     Window.Current.Content = this;
     this.OnNavigatedTo(null);
     Window.Current.Activate();
 }
 /// <summary>
 /// Removes a contact from the ContactPickerUI.
 /// </summary>
 /// <param name="sender">ContactPickerIU to remove contact</param>
 /// <param name="args">Args of the removed contact</param>
 private async void ContactPickerUI_ContactRemoved(ContactPickerUI sender, ContactRemovedEventArgs args)
 {
     // The event handler may be invoked on a background thread, so use the Dispatcher to run the UI-related code on the UI thread.
     string removedId = args.Id;
     await this.dispatcher.RunAsync(
         CoreDispatcherPriority.Normal, 
         () =>
         {
             foreach (SampleContact contact in ContactList.SelectedItems)
             {
                 if (contact.Id == removedId)
                 {
                     ContactList.SelectedItems.Remove(contact);
                     OutputText.Text += "\n" + contact.DisplayName + " was removed from the basket";
                     break;
                 }
             }
         });
 }
 public ContactPickerUIEvents(ContactPickerUI This)
 {
     this.This = This;
 }