Skip to main content
ContactPickerUI.ContactRemoved | contactremoved event

Applies to Windows only

Occurs when the user deselects or removes the contact.

Syntax


function onContactRemoved(eventArgs) { /* Your code */ }
 
// addEventListener syntax
contactPickerUI.addEventListener("contactremoved", onContactRemoved);
contactPickerUI.removeEventListener("contactremoved", onContactRemoved);
 
- or -

contactPickerUI.oncontactremoved = onContactRemoved;

public event TypedEventHandler<ContactPickerUI, ContactRemovedEventArgs> ContactRemoved

Public Event ContactRemoved As TypedEventHandler(Of ContactPickerUI, ContactRemovedEventArgs)

public:
event TypedEventHandler<ContactPickerUI, ContactRemovedEventArgs>^ ContactRemoved {
   Windows::Foundation::EventRegistrationToken add(TypedEventHandler<ContactPickerUI, ContactRemovedEventArgs>^ value);
   void remove(Windows::Foundation::EventRegistrationToken token);
}

Event information

Delegate TypedEventHandler<ContactPickerUI, ContactRemovedEventArgs>

Examples


var contactPickerUI = null;  

function activatedHandler(ev) {  
    if (ev.detail[0].kind == Windows.ApplicationModel.Activation.ActivationKind.contactPicker) {  
        contactPickerUI = ev.detail[0].contactPickerUI;  
        contactPickerUI.addEventListener("contactremoved", onContactRemoved);  
    }  
}

function onContactRemoved(e) {
    var contactId = e.id;

    // TODO: Respond to removal of this contact.

}

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

None supported

Namespace

Windows.ApplicationModel.Contacts.Provider
Windows::ApplicationModel::Contacts::Provider [C++]

Metadata

Windows.winmd

See also

ContactPickerUI