ContextMenuService.SetContextMenu(DependencyObject, ContextMenu) 方法

定义

设置指定对象的 ContextMenu 属性的值。

public:
 static void SetContextMenu(System::Windows::DependencyObject ^ element, System::Windows::Controls::ContextMenu ^ value);
public static void SetContextMenu (System.Windows.DependencyObject element, System.Windows.Controls.ContextMenu value);
static member SetContextMenu : System.Windows.DependencyObject * System.Windows.Controls.ContextMenu -> unit
Public Shared Sub SetContextMenu (element As DependencyObject, value As ContextMenu)

参数

element
DependencyObject

要对其设置属性的对象。

value
ContextMenu

要设置的值。

适用于