New to Telerik UI for WinForms? Start a free 30-day trial

Stores a URI or stream as a bitmap source; assigning a stream inspects its dimensions, while a URI is stored without loading the image.

Definition

Namespace:Telerik.WinControls.UI.Diagrams

Assembly:Telerik.WinControls.RadDiagram.dll

Syntax:

C#
public sealed class BitmapImage : BitmapSource

Inheritance: objectBitmapSourceBitmapImage

Constructors

Creates a bitmap source with no URI or stream assigned.

C#
public BitmapImage()

Creates a bitmap source that stores the specified URI without loading image data from it.

C#
public BitmapImage(Uri uri)
Parameters:uriUri

The URI to retain as the source identifier.

Properties

Gets or sets creation flags. The current loader stores this value but does not use it when reading the stream.

C#
public BitmapCreateOptions CreateOptions { get; set; }

Gets the height, in pixels, recorded by the last successful stream inspection.

C#
public int PixelHeight { get; }

Gets the width, in pixels, recorded by the last successful stream inspection.

C#
public int PixelWidth { get; }

Gets or sets the stream used as image data. Assigning a non-null stream reads and stores its pixel dimensions.

C#
public Stream StreamSource { get; set; }
Exceptions: NotSupportedException

The stream does not contain an image that can be read.

The stream is retained and is not disposed by this property.

Gets or sets the URI associated with this source. Setting it does not load image data.

C#
public Uri UriSource { get; set; }