Windows Dev Center

EN
Este conteúdo não está disponível em seu idioma, mas aqui está a versão em inglês.

ApplicationData.DataChanged | datachanged event

Occurs when roaming application data is synchronized.

Syntax


function onDataChanged(eventArgs) { /* Your code */ }
 
// addEventListener syntax
applicationData.addEventListener("datachanged", onDataChanged);
applicationData.removeEventListener("datachanged", onDataChanged);
 
- or -

applicationData.ondatachanged = onDataChanged;


Event information

Delegate TypedEventHandler<ApplicationData, Object>

Examples

This example registers for the DataChanged | datachanged event.



var applicationData = Windows.Storage.ApplicationData.current;

function initialize() 
{
    applicationData.addEventListener("datachanged", datachangeHandler);
}

function dataChangeHandler(eventArgs)
{
    // TODO: Refresh your data
}

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Storage
Windows::Storage [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Storage
Windows::Storage [C++]

Metadata

Windows.winmd

See also

Tasks
Quickstart: Roaming application data (JavaScript)
Quickstart: Roaming application data (C#/VB/C++)
Concepts
Application data overview
Reference
ApplicationData

 

 

Mostrar:
© 2015 Microsoft