ColorConvertedBitmap.DestinationFormat Eigenschaft

Definition

Ruft einen Wert ab, der das PixelFormat der konvertierten Bitmap darstellt, oder legt diesen fest.

public:
 property System::Windows::Media::PixelFormat DestinationFormat { System::Windows::Media::PixelFormat get(); void set(System::Windows::Media::PixelFormat value); };
public System.Windows.Media.PixelFormat DestinationFormat { get; set; }
member this.DestinationFormat : System.Windows.Media.PixelFormat with get, set
Public Property DestinationFormat As PixelFormat

Eigenschaftswert

Eine Instanz von PixelFormat.

Beispiele

Im folgenden Beispiel wird gezeigt, wie der Wert der DestinationFormat -Eigenschaft festgelegt wird.

ColorConvertedBitmap myColorConvertedBitmap = new ColorConvertedBitmap();
myColorConvertedBitmap.BeginInit();
myColorConvertedBitmap.SourceColorContext = myBitmapSourceFrame2.ColorContexts[0];
myColorConvertedBitmap.Source = myBitmapSource2;
myColorConvertedBitmap.DestinationFormat = PixelFormats.Pbgra32;
myColorConvertedBitmap.DestinationColorContext = new ColorContext(PixelFormats.Bgra32);
myColorConvertedBitmap.EndInit();
Dim myColorConvertedBitmap As New ColorConvertedBitmap()
myColorConvertedBitmap.BeginInit()
myColorConvertedBitmap.SourceColorContext = myBitmapSourceFrame2.ColorContexts(0)
myColorConvertedBitmap.Source = myBitmapSource2
myColorConvertedBitmap.DestinationFormat = PixelFormats.Pbgra32
myColorConvertedBitmap.DestinationColorContext = New ColorContext(PixelFormats.Bgra32)
myColorConvertedBitmap.EndInit()

Hinweise

Wenn Sie Eigenschaftenänderungen an einem ColorConvertedBitmapvornehmen, müssen die Änderungen innerhalb eines BeginInit - und EndInit -Blocks erfolgen.

Informationen zur Abhängigkeitseigenschaft

Bezeichnerfeld DestinationFormatProperty
Metadateneigenschaften auf true festgelegt Keine

Gilt für:

Weitere Informationen