Taal

TransformedBitmap.BeginInit Methode

Definitie

Geeft het begin van de TransformedBitmap initialisatie aan.

public:
 virtual void BeginInit();
public void BeginInit();
abstract member BeginInit : unit -> unit
override this.BeginInit : unit -> unit
Public Sub BeginInit ()

Implementeringen

Uitzonderingen

Het TransformedBitmap wordt momenteel geïnitialiseerd. BeginInit() is al gebeld.

– of –

De TransformedBitmap is al geïnitialiseerd.

Voorbeelden

In het volgende voorbeeld ziet u hoe u een TransformedBitmap met een set eigenschappen initialiseert met behulp van de BeginInit en EndInit methoden.

// Create the new BitmapSource that will be used to scale the size of the source.
TransformedBitmap myRotatedBitmapSource = new TransformedBitmap();

// BitmapSource objects like TransformedBitmap can only have their properties
// changed within a BeginInit/EndInit block.
myRotatedBitmapSource.BeginInit();

// Use the BitmapSource object defined above as the source for this BitmapSource.
// This creates a "chain" of BitmapSource objects which essentially inherit from each other.
myRotatedBitmapSource.Source = myBitmapImage;

// Flip the source 90 degrees.
myRotatedBitmapSource.Transform = new RotateTransform(90);
myRotatedBitmapSource.EndInit();
' Create the new BitmapSource that will be used to scale the size of the source.
Dim myRotatedBitmapSource As New TransformedBitmap()

' BitmapSource objects like TransformedBitmap can only have their properties
' changed within a BeginInit/EndInit block.
myRotatedBitmapSource.BeginInit()

' Use the BitmapSource object defined above as the source for this BitmapSource.
' This creates a "chain" of BitmapSource objects which essentially inherit from each other.
myRotatedBitmapSource.Source = myBitmapImage

' Flip the source 90 degrees.
myRotatedBitmapSource.Transform = New RotateTransform(90)
myRotatedBitmapSource.EndInit()

Opmerkingen

Initialisatie van eigenschappen moet worden uitgevoerd tussen BeginInit en EndInit aanroepen. Zodra de TransformedBitmap eigenschap is geïnitialiseerd, worden eigenschapswijzigingen genegeerd.

Van toepassing op

Zie ook