Class BitmapImage
Provides the practical object source type for the Source and ImageSource properties.
Inherited Members
Namespace: System.Windows.Media.Imaging
Assembly: OpenSilver.dll
Syntax
public sealed class BitmapImage : BitmapSource, IDependencyObject
Constructors
| Improve this Doc View SourceBitmapImage()
Initializes a new instance of the BitmapImage class.
Declaration
public BitmapImage()
BitmapImage(Uri)
Initializes a new instance of the BitmapImage class, using the supplied URI.
Declaration
public BitmapImage(Uri uriSource)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | uriSource | The URI that references the source graphics file for the image. |
Fields
| Improve this Doc View SourceCreateOptionsProperty
Identifies the CreateOptions dependency property.
Declaration
[NotImplemented]
public static readonly DependencyProperty CreateOptionsProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
UriSourceProperty
Identifies the UriSource dependency property.
Declaration
public static readonly DependencyProperty UriSourceProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourceCreateOptions
Gets or sets the BitmapCreateOptions for a BitmapImage.
Declaration
[NotImplemented]
public BitmapCreateOptions CreateOptions { get; set; }
Property Value
Type | Description |
---|---|
BitmapCreateOptions | The BitmapCreateOptions used for this BitmapImage. The default is DelayCreation. |
UriSource
Gets or sets the URI of the graphics source file that generated this BitmapImage.
Declaration
public Uri UriSource { get; set; }
Property Value
Type | Description |
---|---|
System.Uri | The URI of the graphics source file that generated this BitmapImage. |
Events
| Improve this Doc View SourceImageFailed
Occurs when there is an error associated with image retrieval or format.
Declaration
public event ExceptionRoutedEventHandler ImageFailed
Event Type
Type | Description |
---|---|
ExceptionRoutedEventHandler |
ImageOpened
Occurs when the image source is downloaded and decoded with no failure. You can use this event to determine the size of an image before rendering it.
Declaration
public event RoutedEventHandler ImageOpened
Event Type
Type | Description |
---|---|
RoutedEventHandler |
UriSourceChanged
Occurs when the UriSource is changed.
Declaration
public event EventHandler UriSourceChanged
Event Type
Type | Description |
---|---|
System.EventHandler |