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() メソッドが呼び出されています。

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

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

注釈

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

適用対象

こちらもご覧ください