DestinationColorContext Property

ColorConvertedBitmap.DestinationColorContext Property


Gets or sets a value that identifies the color profile, as defined by the ColorContext class, of the converted bitmap.

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

public ColorContext DestinationColorContext { get; set; }

Property Value

Type: System.Windows.Media.ColorContext

An instance of ColorContext.

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

Identifier field


Metadata properties set to true


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

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

.NET Framework
Available since 3.0
Return to top
© 2015 Microsoft