ToolTipService.SetPlacementRectangle(DependencyObject, Rect) 方法

定义

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

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

参数

element
DependencyObject

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

value
Rect

要设置的值。

示例

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

ToolTipService.SetPlacementRectangle(ellipse2,
    new Rect(50, 0, 0, 0));
ToolTipService.SetPlacementRectangle(ellipse2, New Rect(50, 0, 0, 0))

适用于

另请参阅