LauncherOptions.DisplayApplicationPicker | displayApplicationPicker property
Gets or sets a value that indicates whether to display the Open With dialog whenever the association launching API is called.
True if the Open With dialog should always be displayed; otherwise false.
You should use the Open With dialog box when the user may want to select an app other than the default for a particular file. For example if your app allows the user to launch an image file, the default handler will likely be a viewer app. In some cases the user may want to edit the image instead of viewing it. Use the Open With option along with an alternative command in the AppBar or in a context menu to let the user bring up the Open With dialog and select the editor app in these types of scenarios.
This API is not implemented and will throw an exception if called. See Windows Phone Runtime API.
Call the Launcher.LaunchFileAsync(IStorageFile, LauncherOptions) | launchFileAsync(IStorageFile, LauncherOptions) method with LauncherOptions.DisplayApplicationPicker | displayApplicationPicker set to true to launch the app that the user selects for the file from the Open With dialog box.
async Sub DefaultLaunch() ' Path to the file in the app package to launch Dim imageFile = "images\test.png" Dim file = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync(imageFile) If file IsNot Nothing Then ' Set the option to show the picker Dim options = Windows.System.LauncherOptions() options.DisplayApplicationPicker = True ' Launch the retrieved file Dim success = await Windows.System.Launcher.LaunchFileAsync(file, options) If success Then ' File launched Else ' File launch failed End If Else ' Could not find file End If End Sub
Minimum supported client
Minimum supported server
|Windows Server 2012|
Minimum supported phone
|Windows Phone 8 [not implemented, see Remarks]|
- Association launching sample
- How to launch the default app for a file (C#/VB/C++)
- How to launch the default app for a URI (C#/VB/C++)
- Guidelines and checklist for file types and URIs
- Launcher.LaunchFileAsync(IStorageFile, LauncherOptions)
- Launcher.LaunchUriAsync(Uri, LauncherOptions)