ColorConvertedBitmap.Source Property

 
System_CAPS_noteNote

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

Gets or sets a value that identifies the source bitmap that is converted.

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

public BitmapSource Source { get; set; }

Property Value

Type: System.Windows.Media.Imaging.BitmapSource

A value that identifies the source bitmap that is converted.

When you make property changes to a ColorConvertedBitmap, the changes must be done within a BeginInit and EndInit block.

Identifier field

SourceProperty

Metadata properties set to true

None

The following example shows how to set the value of the Source property.

ColorConvertedBitmap myColorConvertedBitmap = new ColorConvertedBitmap();
myColorConvertedBitmap.BeginInit();
myColorConvertedBitmap.SourceColorContext = myBitmapSourceFrame2.ColorContexts[0];
myColorConvertedBitmap.Source = myBitmapSource2;
myColorConvertedBitmap.DestinationFormat = PixelFormats.Pbgra32;
myColorConvertedBitmap.DestinationColorContext = new ColorContext(PixelFormats.Bgra32);
myColorConvertedBitmap.EndInit();

.NET Framework
Available since 3.0
Return to top
Show: