Bagikan melalui


ContextMenu.PlacementRectangle Properti

Definisi

Mendapatkan atau mengatur area relatif terhadap tempat menu konteks diposisikan saat terbuka.

public:
 property System::Windows::Rect PlacementRectangle { System::Windows::Rect get(); void set(System::Windows::Rect value); };
[System.ComponentModel.Bindable(true)]
public System.Windows.Rect PlacementRectangle { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.PlacementRectangle : System.Windows.Rect with get, set
Public Property PlacementRectangle As Rect

Nilai Properti

Area yang menentukan persegi panjang yang digunakan untuk memosisikan menu konteks. Defaultnya adalah Empty.

Atribut

Contoh

Contoh berikut menunjukkan cara menggunakan PlacementRectangle properti dan menentukan di mana ContextMenu ditempatkan.

<ContextMenu Placement="Bottom" PlacementRectangle="30,50,0,0">

Keterangan

Anda dapat memposisikan dengan ContextMenu mengatur properti , , PlacementPlacementRectangle, HorizontalOffset, dan VerticalOffsetPropertyPlacementTarget. Properti ini berulah sama seperti yang mereka lakukan untuk Popup. Untuk informasi selengkapnya, lihat Perilaku Penempatan Popup.

Informasi Properti Dependensi

Item Nilai
Bidang pengidentifikasi PlacementRectangleProperty
Properti metadata diatur ke true Tidak

Berlaku untuk

Lihat juga