Rotation 열거형

정의

비트맵 이미지에 적용할 회전을 지정합니다.

public enum class Rotation
public enum Rotation
type Rotation = 
Public Enum Rotation
상속
Rotation

필드

Rotate0 0

비트맵이 회전되지 않습니다. 기본값입니다.

Rotate180 2

비트맵을 시계 방향으로 180도 회전합니다.

Rotate270 3

비트맵을 시계 방향으로 270도 회전합니다.

Rotate90 1

비트맵을 시계 방향으로 90도 회전합니다.

예제

다음 예제에서는 비트맵 이미지에 회전을 적용 하는 방법에 설명 합니다.

// Define a BitmapImage.
Image myImage = new Image();
BitmapImage bi = new BitmapImage();

// Begin initialization.
bi.BeginInit();

// Set properties.
bi.CacheOption = BitmapCacheOption.OnDemand;
bi.CreateOptions = BitmapCreateOptions.DelayCreation;
bi.DecodePixelHeight = 125;
bi.DecodePixelWidth = 125;
bi.Rotation = Rotation.Rotate90;
MessageBox.Show(bi.IsDownloading.ToString());
bi.UriSource = new Uri("smiley.png", UriKind.Relative);

// End initialization.
bi.EndInit();
myImage.Source = bi;
myImage.Stretch = Stretch.None;
myImage.Margin = new Thickness(5);
' Define a BitmapImage.
Dim myImage As New Image()
Dim bi As New BitmapImage()

' Begin initialization.
bi.BeginInit()

' Set properties.
bi.CacheOption = BitmapCacheOption.OnDemand
bi.CreateOptions = BitmapCreateOptions.DelayCreation
bi.DecodePixelHeight = 125
bi.DecodePixelWidth = 125
bi.Rotation = Rotation.Rotate90
MessageBox.Show(bi.IsDownloading.ToString())
bi.UriSource = New Uri("smiley.png", UriKind.Relative)

' End initialization.
bi.EndInit()
myImage.Source = bi
myImage.Stretch = Stretch.None
myImage.Margin = New Thickness(5)

설명

90도 증분만 지원됩니다.

적용 대상

추가 정보