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)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation

public ColorContext DestinationColorContext { get; set; }

Property Value

Type: System.Windows.Media.ColorContext
An instance of ColorContext.

Identifier field

DestinationColorContextProperty

Metadata properties set to true

None

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

The following example shows how to set the value of the DestinationColorContext 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

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft