Share via


Launcher.OpenAsync Method

Definition

Overloads

OpenAsync(OpenFileRequest)

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

OpenAsync(String)

Opens the app specified by the URI scheme.

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:
 static System::Threading::Tasks::Task<bool> ^ OpenAsync(Microsoft::Maui::ApplicationModel::OpenFileRequest ^ request);
public static System.Threading.Tasks.Task<bool> OpenAsync (Microsoft.Maui.ApplicationModel.OpenFileRequest request);
static member OpenAsync : Microsoft.Maui.ApplicationModel.OpenFileRequest -> System.Threading.Tasks.Task<bool>
Public Shared 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(String)

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

Opens the app specified by the URI scheme.

public:
 static System::Threading::Tasks::Task<bool> ^ OpenAsync(System::String ^ uri);
public static System.Threading.Tasks.Task<bool> OpenAsync (string uri);
static member OpenAsync : string -> System.Threading.Tasks.Task<bool>
Public Shared Function OpenAsync (uri As String) As Task(Of Boolean)

Parameters

uri
String

URI to open.

Returns

true if the URI was opened, otherwise false.

Exceptions

Thrown when uri is malformed.

Remarks

May throw System.UriFormatException if uri is malformed. Verify if the uri scheme is supported before calling this method

Applies to

OpenAsync(Uri)

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

Opens the app specified by the URI scheme.

public:
 static System::Threading::Tasks::Task<bool> ^ OpenAsync(Uri ^ uri);
public static System.Threading.Tasks.Task<bool> OpenAsync (Uri uri);
static member OpenAsync : Uri -> System.Threading.Tasks.Task<bool>
Public Shared 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.

Remarks

May throw System.UriFormatException if uri is malformed. Verify if the uri scheme is supported before calling this method

Applies to