Namespace:
System.Windows.Media.Imaging
Assembly:
System.Windows (in System.Windows.dll)
Visual Basic (Declaration)
Public NotInheritable Class BitmapImage _
Inherits BitmapSource
Dim instance As BitmapImage
public sealed class BitmapImage : BitmapSource
XAML Object Element Usage
The BitmapImage can be used to reference images in the JPEG and PNG file formats.
If the Image..::.Source property is set to an invalid format, or is specified to a URI that cannot be resolved, then the ImageFailed event is raised.
Silverlight does not support all possible color depths that are included in the PNG specification. The following are the PNG color depths supported in Silverlight:
Indexed color: 1-bit, 4-bit, or 8-bit color depth (per channel).
Truecolor: 24-bit color depth, or 32-bit color depth (per channel) for truecolor. Alpha is supported in 32-bit but not in 24-bit PNG file formats.
Notably, gray scale (with or without alpha), and 64-bit truecolor, are not supported in Silverlight.
There are two ways to specify the graphics content for a BitmapImage: by URI, or by stream. You can set with either of these, and the behavior is that the last technique used will specify the content.
XAML usage for BitmapImage as an object element is uncommon, because it would only be appropriate for setting a BitmapImage as the object element within a property element usage for setting Image..::.Source. More typically you would use Image and use the URI to set Image..::.Source as an attribute.
System..::.Object
System.Windows..::.DependencyObject
System.Windows.Media..::.ImageSource
System.Windows.Media.Imaging..::.BitmapSource
System.Windows.Media.Imaging..::.BitmapImage
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
Reference