TransformedBitmap.EndInit メソッド

定義

BitmapImage初期化の終了を通知します。

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 ()

実装

属性

例外

SourceまたはTransformのプロパティはnull

-又は-

変換は直交変換ではありません。

-又は-

EndInit() メソッドは、最初にBeginInit()を呼び出さずに呼び出されます。

次の例では、TransformedBitmapメソッドと BeginInit メソッドを使用して、プロパティのセットを使用してEndInitを初期化する方法を示します。

// 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()

注釈

プロパティの初期化は、 BeginInit 呼び出しと EndInit 呼び出しの間に行う必要があります。 TransformedBitmapが初期化されると、プロパティの変更は無視されます。

適用対象

こちらもご覧ください