Windows Dev Center

WebUICachedFileUpdaterActivatedEventArgs class

Provides information about the activated event that fires when the user saves or opens a file that needs updates from the app.

C#/C++/VB:  This type appears as CachedFileUpdaterActivatedEventArgs.

Syntax


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

Members

The WebUICachedFileUpdaterActivatedEventArgs class has these types of members:

Methods

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

Properties

The WebUICachedFileUpdaterActivatedEventArgs class has these properties.

PropertyAccess typeDescription

ActivatedOperation

Read-onlyGets the app activated operation.

CachedFileUpdaterUI

Read-onlyGets the letterbox UI of the file picker that is displayed when a file needs updates from the app.

Kind

Read-onlyGets the activation type.

PreviousExecutionState

Read-onlyGets the execution state of the app before it was activated.

SplashScreen

Read-onlyGets the splash screen object that provides information about the transition from the splash screen to the activated app.

 

Remarks

Learn more about providing updates for files that your app offers in the Quickstart: Providing file services through file pickers and in the Windows.Storage.Pickers.Provider namespace reference.

This object is accessed when you implement an event handler for the WinJS.Application.Onactivated or the Windows.UI.WebUI.WebUIApplication.activated events when ActivationKind is cachedFileUpdater.

Note  : This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX).
 

Examples

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



// cachedFileUpdater activated event handler
function activated(eventObject) {
        // Identify whether app was launched for cachedFileUpdater
        if (eventObject.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.cachedFileUpdater) {
            // Perform tasks to prepare your app to display its file picker page

            // Get file picker UI
            cachedFileUpdaterUI = eventObject.detail.cachedFileUpdaterUI;

            cachedFileUpdaterUI.addEventListener("fileupdaterequested", onFileUpdateRequest);
            cachedFileUpdaterUI.addEventListener("uirequested", onUIRequested);

            switch (cachedFileUpdaterUI.updateTarget) {
                case Windows.Storage.Provider.CachedFileTarget.local:
                    scenarios = [{ url: "/html/cachedFileUpdaterScenario1.html", title: "Get latest version" }];
                    break;
                case Windows.Storage.Provider.CachedFileTarget.remote:
                    scenarios = [{ url: "/html/cachedFileUpdaterScenario2.html", title: "Remote file update" }];
                    break;
            }
            SdkSample.scenarios = scenarios;
        }
    }

// Register the activated event handler
WinJS.Application.addEventListener("activated", activated, false);

For JavaScript, eventObject contains a webUICachedFileUpdaterActivatedEventArgs object.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.UI.WebUI

Metadata

Windows.Foundation.UniversalApiContract.winmd

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

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.UI.WebUI

Metadata

Windows.winmd

Attributes

[MarshalingBehavior(Standard)]
[Version(0x06020000)]

See also

Object
ICachedFileUpdaterActivatedEventArgs
IActivatedEventArgs
IActivatedEventArgsDeferral
Quickstart: Providing file services through file pickers

 

 

Show:
© 2015 Microsoft