共用方式為


ContextMenuService.SetPlacementTarget(DependencyObject, UIElement) 方法

定義

設定所指定物件之 PlacementTarget 屬性的值。

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

參數

element
DependencyObject

要設定值的物件。

value
UIElement

要設定的值。

適用於