WebUIFileActivatedEventArgs class

Applies to Windows and Windows Phone

Provides data when an app is activated because it is the app associated with a file.

Syntax


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

Attributes

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

Members

The WebUIFileActivatedEventArgs class has these types of members:

Methods

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

Properties

The WebUIFileActivatedEventArgs class has these properties.

PropertyAccess typeDescription

ActivatedOperation

Read-onlyGets the app activation operation.

CurrentlyShownApplicationViewId

Read-onlyGets the identifier for the currently shown app view.

Files

Read-onlyGets the files for which the app was activated.

Kind

Read-onlyGets the activation type.

NeighboringFilesQuery

Read-onlyGets the neighboring files of the files for which the app was activated.

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.

Verb

Read-onlyGets the action associated with the activated file.

 

Remarks

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 file.

Note that when your app is activated for the file contract you must access the data using the StorageFile objects passed to your app through the Files property. You should not attempt to access the path of the file since your app may not have permission to the file’s location.

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 activated event handler receives all activation events. The kind property indicates the type of activation event. This example is set up to handle file activation events.


function onActivatedHandler(eventArgs) {
   if (eventArgs.detail.kind == Windows.ApplicationModel.Activation.ActivationKind.file) 
   {
       // TODO: Handle file activation.

       // The number of files received is eventArgs.detail.files.size
       // The first file is eventArgs.detail.files[0].name
   }
}

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

Metadata

Windows.winmd

See also

Samples
Association launching sample
Tasks
How to handle file activation
Guidelines
Guidelines and checklist for file types and protocols
Reference
Windows.Storage
WebUIApplication.ActivatedEventHandler
WinJS.Application.onactivated

 

 

Show:
© 2014 Microsoft