Επεξεργασία

Κοινή χρήση μέσω


ColorConvertedBitmap.EndInit Method

Definition

Signals the end of the ColorConvertedBitmap initialization.

public:
 virtual void EndInit();
[System.Security.SecurityCritical]
public void EndInit ();
public void EndInit ();
[<System.Security.SecurityCritical>]
abstract member EndInit : unit -> unit
override this.EndInit : unit -> unit
abstract member EndInit : unit -> unit
override this.EndInit : unit -> unit
Public Sub EndInit ()

Implements

Attributes

Exceptions

The Source, SourceColorContext, or DestinationColorContext property is null.

-or-

The EndInit() method is called without first calling BeginInit().

Examples

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

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();
Dim myColorConvertedBitmap As New ColorConvertedBitmap()
myColorConvertedBitmap.BeginInit()
myColorConvertedBitmap.SourceColorContext = myBitmapSourceFrame2.ColorContexts(0)
myColorConvertedBitmap.Source = myBitmapSource2
myColorConvertedBitmap.DestinationFormat = PixelFormats.Pbgra32
myColorConvertedBitmap.DestinationColorContext = New ColorContext(PixelFormats.Bgra32)
myColorConvertedBitmap.EndInit()

Remarks

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

Applies to

See also