Skip to main content

Open Method

Opens the asset with the requested URI.

Definition​

Namespace: Avalonia.Platform
Assembly: Avalonia.Base (in Avalonia.Base.dll)

public static Stream Open(
Uri uri,
Uri? baseUri = null
)

Parameters​

  Uri
The URI.
  Uri  (Optional)
A base URI to use if uri is relative.

Return Value​

Stream
A stream containing the asset contents.

Exceptions​

FileNotFoundExceptionThe asset could not be found.

See Also​

Reference​

AssetLoader Class
Avalonia.Platform Namespace