TransformedBitmap.BeginInit 메서드

정의

초기화의 시작을 알릴 수 TransformedBitmap 있습니다.

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

구현

예외

TransformedBitmap 현재 초기화 중입니다. BeginInit() 가 이미 호출되었습니다.

-또는-

TransformedBitmap 이미 초기화되었습니다.

예제

다음 예제에서는 및 메서드를 TransformedBitmap 사용하여 속성 집합을 사용하여 BeginInitEndInit 초기화하는 방법을 보여 줍니다.

// 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 초기화되면 속성 변경 내용이 무시됩니다.

적용 대상

추가 정보