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 属性的值。

属性

适用于