Skip to main content

ILauncher Interface

Definition​

Assembly:Avalonia.Base
Package:Avalonia

Starts the default app associated with the specified file or URI.

public interface ILauncher

Methods​

NameDescription
LaunchFileAsyncStarts the default app associated with the specified storage file or folder.
LaunchUriAsyncStarts the default app associated with the URI scheme name for the specified URI.

LaunchFileAsync Method​

Starts the default app associated with the specified storage file or folder.

public System.Threading.Tasks.Task<bool> LaunchFileAsync(Avalonia.Platform.Storage.IStorageItem storageItem)

Parameters​

storageItem Avalonia.Platform.Storage.IStorageItem

The file or folder.

Returns​

System.Threading.Tasks.Task<bool>

True, if launch operation was successful. False, if unsupported or failed.

LaunchUriAsync Method​

Starts the default app associated with the URI scheme name for the specified URI.

public System.Threading.Tasks.Task<bool> LaunchUriAsync(Uri uri)

Parameters​

uri Uri

The URI.

Returns​

System.Threading.Tasks.Task<bool>

True, if launch operation was successful. False, if unsupported or failed.