共用方式為


ContextMenuService.GetContextMenu(DependencyObject) 方法

定義

取得指定物件之 ContextMenu 屬性的值。

public:
 static System::Windows::Controls::ContextMenu ^ GetContextMenu(System::Windows::DependencyObject ^ element);
[System.Windows.AttachedPropertyBrowsableForType(typeof(System.Windows.DependencyObject))]
public static System.Windows.Controls.ContextMenu GetContextMenu (System.Windows.DependencyObject element);
[<System.Windows.AttachedPropertyBrowsableForType(typeof(System.Windows.DependencyObject))>]
static member GetContextMenu : System.Windows.DependencyObject -> System.Windows.Controls.ContextMenu
Public Shared Function GetContextMenu (element As DependencyObject) As ContextMenu

參數

element
DependencyObject

要查詢有關 ContextMenu 屬性的物件。

傳回

ContextMenu

ContextMenu 屬性的值。

屬性

適用於