Jaa


WebUIFileActivatedEventArgs Class

Definition

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

public ref class WebUIFileActivatedEventArgs sealed : IApplicationViewActivatedEventArgs, IFileActivatedEventArgsWithNeighboringFiles, IActivatedEventArgsDeferral
public ref class WebUIFileActivatedEventArgs sealed : IActivatedEventArgsWithUser, IApplicationViewActivatedEventArgs, IFileActivatedEventArgsWithNeighboringFiles, IActivatedEventArgsDeferral
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
class WebUIFileActivatedEventArgs final : IApplicationViewActivatedEventArgs, IFileActivatedEventArgsWithNeighboringFiles, IActivatedEventArgsDeferral
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
class WebUIFileActivatedEventArgs final : IActivatedEventArgsWithUser, IApplicationViewActivatedEventArgs, IFileActivatedEventArgsWithNeighboringFiles, IActivatedEventArgsDeferral
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
public sealed class WebUIFileActivatedEventArgs : IApplicationViewActivatedEventArgs, IFileActivatedEventArgsWithNeighboringFiles, IActivatedEventArgsDeferral
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Standard)]
public sealed class WebUIFileActivatedEventArgs : IActivatedEventArgsWithUser, IApplicationViewActivatedEventArgs, IFileActivatedEventArgsWithNeighboringFiles, IActivatedEventArgsDeferral
Public NotInheritable Class WebUIFileActivatedEventArgs
Implements IActivatedEventArgsDeferral, IApplicationViewActivatedEventArgs, IFileActivatedEventArgsWithNeighboringFiles
Public NotInheritable Class WebUIFileActivatedEventArgs
Implements IActivatedEventArgsDeferral, IActivatedEventArgsWithUser, IApplicationViewActivatedEventArgs, IFileActivatedEventArgsWithNeighboringFiles
Inheritance
Object Platform::Object IInspectable WebUIFileActivatedEventArgs
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Examples

The activated event handler receives all activation events. The 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
   }
}

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

Version history

Windows version SDK version Value added
1607 14393 User

Properties

ActivatedOperation

Gets the app activation operation.

CurrentlyShownApplicationViewId

Gets the identifier for the currently shown app view.

Files

Gets the files for which the app was activated.

Kind

Gets the activation type.

NeighboringFilesQuery

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

PreviousExecutionState

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

SplashScreen

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

User

Gets the user that the app was activated for.

Verb

Gets the action associated with the activated file.

Applies to

See also