WebUICachedFileUpdaterActivatedEventArgs WebUICachedFileUpdaterActivatedEventArgs WebUICachedFileUpdaterActivatedEventArgs 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

Declaration

public sealed class WebUICachedFileUpdaterActivatedEventArgspublic sealed class WebUICachedFileUpdaterActivatedEventArgsPublic NotInheritable Class WebUICachedFileUpdaterActivatedEventArgs

Remarks

Learn more about providing updates for files that your app offers in the Quickstart: Providing file services through 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 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 ActivationKind 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.

Properties summary

Gets the app activated operation.

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

Gets the activation type.

Gets the execution state of the app before it was activated.

Gets the splash screen object that provides information about the transition from the splash screen to the activated app.

Gets the user that the app was activated for.

Properties

  • ActivatedOperation
    ActivatedOperation
    ActivatedOperation
    ActivatedOperation

    Gets the app activated operation.

    public ActivatedOperation ActivatedOperation { get; }public ActivatedOperation ActivatedOperation { get; }Public ReadOnly Property ActivatedOperation As ActivatedOperation

    Property Value

  • CachedFileUpdaterUI
    CachedFileUpdaterUI
    CachedFileUpdaterUI
    CachedFileUpdaterUI

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

    public CachedFileUpdaterUI CachedFileUpdaterUI { get; }public CachedFileUpdaterUI CachedFileUpdaterUI { get; }Public ReadOnly Property CachedFileUpdaterUI As CachedFileUpdaterUI

    Property Value

  • Kind
    Kind
    Kind
    Kind

    Gets the activation type.

    public ActivationKind Kind { get; }public ActivationKind Kind { get; }Public ReadOnly Property Kind As ActivationKind

    Property Value

  • PreviousExecutionState
    PreviousExecutionState
    PreviousExecutionState
    PreviousExecutionState

    Gets the execution state of the app before it was activated.

    public ApplicationExecutionState PreviousExecutionState { get; }public ApplicationExecutionState PreviousExecutionState { get; }Public ReadOnly Property PreviousExecutionState As ApplicationExecutionState

    Property Value

  • SplashScreen
    SplashScreen
    SplashScreen
    SplashScreen

    Gets the splash screen object that provides information about the transition from the splash screen to the activated app.

    public SplashScreen SplashScreen { get; }public SplashScreen SplashScreen { get; }Public ReadOnly Property SplashScreen As SplashScreen

    Property Value

    Remarks

    Examples

    The Splash screen sample demonstrates how to retrieve a SplashScreen object in its Activated event handler, if the app was launched:

    
    // Identify and respond to all app activated events.
    WinJS.Application.onactivated = function (eventObject) {
    
        // App was launched
        if (eventObject.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.launch) {
            // Retrieve splash screen object
            splash = eventObject.detail.splashScreen;
    
            // Add code get image coordinates or listen for the dismissed event
    
            WinJS.UI.processAll();
        }
        // Add code to respond to other activated event types
    };
    

    In the sample, eventObject is an object provides information about the activated event. In the case of a ActivationKind activated event, the eventObject is a WebUILaunchActivatedEventArgs object.

  • User
    User
    User
    User

    Gets the user that the app was activated for.

    public User User { get; }public User User { get; }Public ReadOnly Property User As User

    Property Value

    Remarks

    This property returns the logged-in user on platforms that only support single-user sessions. For platforms that support multiple users in a session (such as Xbox) this property returns the logged-in user that the app was activated for.

    This property returns null when a multi-user application is activated with no specific user context.

    Multi-user apps can use this property to allow or restrict app behavior. For example, you might restrict access to content or features based on the user’s credentials.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.UI.WebUI.dll