WebUIFileActivatedEventArgs class
TOC
Collapse the table of content
Expand the table of content

WebUIFileActivatedEventArgs class

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. */

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

Gets the app activation operation.

CurrentlyShownApplicationViewId

Read-only

Gets the identifier for the currently shown app view.

Files

Read-only

Gets the files for which the app was activated.

Kind

Read-only

Gets the activation type.

NeighboringFilesQuery

Read-only

Gets the neighboring files of the files for which the app was activated.

PreviousExecutionState

Read-only

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

SplashScreen

Read-only

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

Verb

Read-only

Gets 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 (Windows 10 device family)

Device family

Universal, introduced version 10.0.10240.0

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
IFileActivatedEventArgs
IActivatedEventArgs
IApplicationViewActivatedEventArgs
IActivatedEventArgsDeferral
IFileActivatedEventArgsWithNeighboringFiles
Samples
Association launching sample
Tasks
How to handle file activation
Guidelines
Guidelines for file types and URIs
Reference
Windows.Storage
WebUIApplication.ActivatedEventHandler
WinJS.Application.onactivated
Association launching sample (Windows 10)

 

 

Show:
© 2016 Microsoft