语言

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 。

特性

适用于