FrameworkElement.ContextMenu FrameworkElement.ContextMenu FrameworkElement.ContextMenu FrameworkElement.ContextMenu Property

定義

取得或設定透過操作功能表項目的 使用者介面 (UI)user interface (UI) 要求操作功能表時應該出現的操作功能表項目。Gets or sets the context menu element that should appear whenever the context menu is requested through 使用者介面 (UI)user interface (UI) from within this element.

public:
 property System::Windows::Controls::ContextMenu ^ ContextMenu { System::Windows::Controls::ContextMenu ^ get(); void set(System::Windows::Controls::ContextMenu ^ value); };
public System.Windows.Controls.ContextMenu ContextMenu { get; set; }
member this.ContextMenu : System.Windows.Controls.ContextMenu with get, set
Public Property ContextMenu As ContextMenu

屬性值

指派給這個項目的操作功能表。The context menu assigned to this element.

備註

ContextMenu 本身是FrameworkElement衍生類別,然後就技術上來說可能ContextMenu本身有ContextMenu屬性。ContextMenu itself is a FrameworkElement derived class, and it is technically possible for ContextMenu itself to have a ContextMenu property. 不過,這會建立令人混淆的內容功能表經驗的使用者,並不建議這種做法。However, this creates a confusing context menu experience for the user and this practice is not recommended.

相依性屬性資訊Dependency Property Information

識別項欄位Identifier field ContextMenuProperty
若要設定的中繼資料屬性 trueMetadata properties set to true None

適用於

另請參閱