ContactRemovedEventArgs ContactRemovedEventArgs ContactRemovedEventArgs Class

Definition

Contains info about a removed contact. Returned when a ContactRemoved event occurs.

public sealed class ContactRemovedEventArgs : IContactRemovedEventArgspublic sealed class ContactRemovedEventArgs : IContactRemovedEventArgsPublic NotInheritable Class ContactRemovedEventArgs Implements IContactRemovedEventArgs
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Your app gets a ContactRemovedEventArgs object when the ContactRemoved event occurs.

Properties

Id Id Id

Contains a unique identifier for the contact.

public string Id { get; }public string Id { get; }Public ReadOnly Property Id As string
Value
string string string

A unique identifier for the contact.

Attributes

Remarks

When you work with contacts, you must supply an ID property for each contact. The value of this property can be whatever makes the most sense for your app, but it must enable you to uniquely identify each contact. Actions like removing a contact depend on this ID value to ensure that the correct contact is removed. For a complete example, see our code sample.

Examples

The following example shows one way to use the Id property of the ContactRemovedEventArgs class.

function onContactRemovedFromBasket(e) {
    var removedContactDiv = document.createElement("div");
    removedContactDiv.innerText = "Contact ID: " + e.id + " has been removed.";
    document.body.appendChild(removedContactDiv);
}