BitmapFrame.Create Method (Stream)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Creates a new BitmapFrame from a given Stream.

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

public static BitmapFrame Create(
	Stream bitmapStream


Type: System.IO.Stream

The Stream that is used to construct the BitmapFrame.

The bitmapStream can be closed after the frame is created only when the OnLoad cache option is used. The default OnDemand cache option retains the stream until the frame is needed. Use the Create(Stream, BitmapCreateOptions, BitmapCacheOption) method to specify create and cache options.

.NET Framework
Available since 3.0
Return to top