D3DImage.PixelWidth Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan lebar D3DImage, dalam piksel.
public:
property int PixelWidth { int get(); };
public int PixelWidth { get; }
member this.PixelWidth : int
Public ReadOnly Property PixelWidth As Integer
Nilai Properti
D3DImageLebar , dalam piksel.
Contoh
Contoh kode berikut menunjukkan cara menggunakan PixelWidth properti untuk menentukan wilayah yang diubah di buffer belakang. Untuk informasi selengkapnya, lihat Panduan: Hosting Konten Direct3D9 di WPF.
d3dimg.Lock();
// Repeatedly calling SetBackBuffer with the same IntPtr is
// a no-op. There is no performance penalty.
d3dimg.SetBackBuffer(D3DResourceType.IDirect3DSurface9, pSurface);
HRESULT.Check(Render());
d3dimg.AddDirtyRect(new Int32Rect(0, 0, d3dimg.PixelWidth, d3dimg.PixelHeight));
d3dimg.Unlock();
Keterangan
Nilai PixelWidth dapat berubah ketika buffer belakang baru ditetapkan oleh panggilan ke SetBackBuffer metode .