Provides a specialized BitmapSource that is optimized for loading images using Extensible Application Markup Language (XAML).
Assembly: PresentationCore (in PresentationCore.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
primarily exists to support Extensible Application Markup Language (XAML) syntax and introduces additional properties for bitmap loading that are not defined by BitmapSource.
implements the ISupportInitialize interface to optimize initialization on multiple properties. Property changes can only occur during object initialization. Call BeginInit to signal that initialization has begun and EndInit to signal that initialization has completed. After initialization, property changes are ignored.
objects created using the BitmapImage constructor are automatically initialized and property changes are ignored.
The following code examples demonstrate how to use a in Extensible Application Markup Language (XAML) and code.
<!-- Property Tag XAML Syntax --> <Image Width="200" Margin="5" Grid.Column="1" Grid.Row="1" > <Image.Source> <BitmapImage UriSource="sampleImages/bananas.jpg" /> </Image.Source> </Image>
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003