Provides data when an app is activated because it is the app associated with a file.
Public NotInheritable Class FileActivatedEventArgs Implements IFileActivatedEventArgs, _ IActivatedEventArgs, _ IFileActivatedEventArgsWithNeighboringFiles, _ IApplicationViewActivatedEventArgs
The FileActivatedEventArgs class has these types of members:
The FileActivatedEventArgs class has these properties.
|Read-only||Gets the identifier for the currently shown app view.|
|Read-only||Gets the files for which the app was activated.|
|Read-only||Gets the activation type.|
|Read-only||Gets the neighboring files of the files for which the app was activated.|
|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.|
Windows Store apps using C++, C#, or Visual Basic typically implement activation points by overriding methods of the Application object. The default template app.xaml code-behind files always include an override for OnLaunched, but defining overrides for other activation points such as OnFileActivated is up to your app code.
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.
Private Sub OnFileActivated(ByVal args As Windows.ApplicationModel.Activation.FileActivatedEventArgs) ' TODO: Handle file activation ' The number of files received is args.Files.Size ' The first file is args.Files(0).Name End Sub
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]|
- Association launching sample
- How to handle file activation
- Guidelines and checklist for file types and protocols