共用方式為


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))

適用於

另請參閱