ContactRemovedEventArgs ContactRemovedEventArgs ContactRemovedEventArgs ContactRemovedEventArgs Class

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

Syntax

Declaration

public sealed class ContactRemovedEventArgspublic sealed class ContactRemovedEventArgsPublic NotInheritable Class ContactRemovedEventArgs

Remarks

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

Properties summary

Contains a unique identifier for the contact.

Properties

  • Id
    Id
    Id
    Id

    Contains a unique identifier for the contact.

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

    Property Value

    • string
      string
      string
      string

      A unique identifier for the contact.

    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);
    }
    

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.ApplicationModel.Contacts.Provider.dll