Rotation Sabit listesi

Tanım

Bit eşlem görüntüsüne uygulanacak döndürmeyi belirtir.

public enum class Rotation
public enum Rotation
type Rotation = 
Public Enum Rotation
Devralma
Rotation

Alanlar

Rotate0 0

Bit eşlem döndürülmedi. Varsayılan değer budur.

Rotate180 2

Bit eşlemi saat yönünde 180 derece döndürün.

Rotate270 3

Bit eşlemi saat yönünde 270 derece döndürün.

Rotate90 1

Bit eşlemi saat yönünde 90 derece döndürün.

Örnekler

Aşağıdaki örnekte bit eşlem görüntüsüne döndürmenin nasıl uygulanacağı gösterilmektedir.

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

Açıklamalar

Yalnızca 90 derecelik artışlar desteklenir.

Şunlara uygulanır

Ayrıca bkz.