ToolTipService.SetPlacement(DependencyObject, PlacementMode) 方法

定义

设置对象的 Placement 附加属性的值。

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

参数

element
DependencyObject

将附加属性写入到的对象。

value
PlacementMode

要设置的值。

示例

以下示例演示如何设置 ToolTipService.Placement 附加属性的值。

ToolTipService.SetPlacement(ellipse2, PlacementMode.Right);
ToolTipService.SetPlacement(ellipse2, PlacementMode.Right)

适用于

另请参阅