New to Telerik Document ProcessingStart a free 30-day trial

Image source that loads image data from a URI, supporting file paths and HTTP/HTTPS URLs with automatic format detection and asynchronous downloading.

Definition

Namespace:Telerik.Windows.Documents.Media

Assembly:Telerik.Windows.Documents.Flow.dll

Syntax:

C#
public sealed class UriImageSource : ImageSource

Inheritance: objectImageSourceUriImageSource

Constructors

Initializes a new UriImageSource from the specified URI with an explicit image format extension, overriding automatic detection.

C#
public UriImageSource(Uri uri, string extension)
Parameters:uriUri

The URI of the image.

extensionstring

The extension of the image.

Initializes a new UriImageSource from the specified URI, with automatic image format detection from the URI extension or HTTP response.

C#
public UriImageSource(Uri uri)
Parameters:uriUri

The URI of the image.

Properties

Raw image bytes loaded from the URI; data is downloaded on first access and cached for subsequent requests.

C#
public override byte[] Data { get; }
Property Value:

The data.

Overrides: ImageSource.Data

Image format extension (e.g., png, jpg, gif) determined from constructor, URI path, or HTTP Content-Type header when data is loaded.

C#
public override string Extension { get; }
Property Value:

The extension.

Overrides: ImageSource.Extension

Uri

Uri

Source URI from which the image data is loaded, supporting file paths and HTTP/HTTPS URLs.

C#
public Uri Uri { get; }
Property Value:

The URI of the image.