Share via


ILauncher.OpenAsync Method

Definition

Overloads

OpenAsync(OpenFileRequest)

Requests to open a file in an application based on content type.

OpenAsync(Uri)

Opens the app specified by the URI scheme.

OpenAsync(OpenFileRequest)

Source:
Launcher.shared.cs
Source:
Launcher.shared.cs

Requests to open a file in an application based on content type.

public:
 System::Threading::Tasks::Task<bool> ^ OpenAsync(Microsoft::Maui::ApplicationModel::OpenFileRequest ^ request);
public System.Threading.Tasks.Task<bool> OpenAsync (Microsoft.Maui.ApplicationModel.OpenFileRequest request);
abstract member OpenAsync : Microsoft.Maui.ApplicationModel.OpenFileRequest -> System.Threading.Tasks.Task<bool>
Public Function OpenAsync (request As OpenFileRequest) As Task(Of Boolean)

Parameters

request
OpenFileRequest

Request that contains information on the file to open.

Returns

true if the file was opened, otherwise false.

Applies to

OpenAsync(Uri)

Source:
Launcher.shared.cs
Source:
Launcher.shared.cs

Opens the app specified by the URI scheme.

public:
 System::Threading::Tasks::Task<bool> ^ OpenAsync(Uri ^ uri);
public System.Threading.Tasks.Task<bool> OpenAsync (Uri uri);
abstract member OpenAsync : Uri -> System.Threading.Tasks.Task<bool>
Public Function OpenAsync (uri As Uri) As Task(Of Boolean)

Parameters

uri
Uri

URI to open.

Returns

true if the URI was opened, otherwise false.

Exceptions

Thrown when uri is malformed.

Applies to