ColorConvertedBitmap.EndInit Method ()


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

Signals the end of the ColorConvertedBitmap initialization.

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

Public Sub EndInit

Exception Condition

The Source, SourceColorContext, or DestinationColorContext property is null.


The EndInit method is called without first calling BeginInit.

Property initialization must be done between BeginInit and EndInit calls. After the ColorConvertedBitmap has been initialized, property changes are ignored.

The following example shows how to use the EndInit method in order to change the properties of a ColorConvertedBitmap.

Dim myColorConvertedBitmap As 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