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
- MarshalingBehaviorAttribute(Standard)
- VersionAttribute(NTDDI_WIN8)
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.
| Property | Access type | Description |
|---|---|---|
| Read-only | Gets the app activation operation. | |
| Read-only | Gets the files for which the app was activated. | |
| Read-only | Gets the activation type. | |
| Read-only | Gets the execution state of the app before it was activated. | |
| Read-only | Gets the splash screen object that provides information about the transition from the splash screen to the activated app. | |
| 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
|
Minimum supported client | Windows 8 [Windows Store apps only] |
|---|---|
|
Minimum supported server | Windows Server 2012 [Windows Store apps only] |
|
Namespace |
Windows.UI.WebUI |
|
Metadata |
|
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
Build date: 12/4/2012