BitmapImage.StreamSource Property

Gets or sets the stream source of the BitmapImage.

Namespace: System.Windows.Media.Imaging
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace:

property Stream^ StreamSource {
	Stream^ get ();
	void set (Stream^ value);
/** @property */
public Stream get_StreamSource ()

/** @property */
public void set_StreamSource (Stream value)

public function get StreamSource () : Stream

public function set StreamSource (value : Stream)

For XAML information, see the Stream type.

Property Value

The stream source of the BitmapImage. The default is a null reference (Nothing in Visual Basic).

If StreamSource and UriSource are both set, the StreamSource value is ignored.

Set the CacheOption to OnLoad if you wish to close the stream after the BitmapImage is created. The default OnDemand cache option retains access to the stream until the bitmap is needed and cleanup is handled by the garbage collector.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions