ColorConvertedBitmap.Source Eigenschaft

Definition

Ruft einen Wert ab, der die zu konvertierende Quell-Bitmap bezeichnet, oder legt diesen fest.

public:
 property System::Windows::Media::Imaging::BitmapSource ^ Source { System::Windows::Media::Imaging::BitmapSource ^ get(); void set(System::Windows::Media::Imaging::BitmapSource ^ value); };
public System.Windows.Media.Imaging.BitmapSource Source { get; set; }
member this.Source : System.Windows.Media.Imaging.BitmapSource with get, set
Public Property Source As BitmapSource

Eigenschaftswert

BitmapSource

Ein Wert, der die zu konvertierende Quell-Bitmap bezeichnet, oder legt diesen fest.

Beispiele

Das folgende Beispiel zeigt, wie Sie den Wert der Source 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 SourceProperty
Metadateneigenschaften auf true festgelegt Keine

Gilt für

Siehe auch