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

PixelFormat

Eine Instanz von PixelFormat.

Beispiele

Das folgende Beispiel zeigt, wie Sie den Wert der DestinationFormat Eigenschaft festlegen.

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 Eigenschaftsänderungen an einer ColorConvertedBitmapEigenschaft vornehmen, 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:

Siehe auch