共用方式為


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)

適用於

另請參閱