FileUpdateRequestedEventArgs class

Applies to Windows and Windows Phone

Provides information about a FileUpdateRequested event.

Syntax


/* For information about creating or accessing this object, see Remarks. */

Attributes

[Version(0x06020000)]

Members

The FileUpdateRequestedEventArgs class has these types of members:

Methods

The FileUpdateRequestedEventArgs class inherits methods from the Object class (C#/VB/C++).

Properties

The FileUpdateRequestedEventArgs class has these properties.

PropertyAccess typeDescription

Request

Read-onlyGets the details of the requested file update.

 

Remarks

If your app participates in the Cached File Updater contract, a FileUpdateRequestedEventArgs is passed to your app's FileUpdateRequested event handler when the event fires. Use the FileUpdateRequestedEventArgs.Request property to get details about the requested update.

Examples

The File picker contracts sample demonstrates how to respond to a FileUpdateRequested event.



// Event handler
function onFileUpdateRequest(e) {
    fileUpdateRequest = e.request;
    fileUpdateRequestDeferral = fileUpdateRequest.getDeferral();

    switch (cachedFileUpdaterUI.uiStatus) {
        case Windows.Storage.Provider.UIStatus.hidden:
            fileUpdateRequest.status = Windows.Storage.Provider.FileUpdateStatus.userInputNeeded;
            fileUpdateRequestDeferral.complete();
            break;
        case Windows.Storage.Provider.UIStatus.visible:
            var url = scenarios[0].url;
            WinJS.Navigation.navigate(url, cachedFileUpdaterUI);
            break;
        case Windows.Storage.Provider.UIStatus.unavailable:
            fileUpdateRequest.status = Windows.Storage.Provider.FileUpdateStatus.failed;
            fileUpdateRequestDeferral.complete();
            break;
    }
}

// Register for the event
cachedFileUpdaterUI.addEventListener("fileupdaterequested", onFileUpdateRequest);

Both args and e (in C# and JS respectively) contain a FileUpdateRequestedEventArgs object.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

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

Metadata

Windows.winmd

 

 

Show:
© 2015 Microsoft