ToolTipService.GetPlacement(DependencyObject) ToolTipService.GetPlacement(DependencyObject) ToolTipService.GetPlacement(DependencyObject) ToolTipService.GetPlacement(DependencyObject) Method

定義

オブジェクトに対する Placement 添付プロパティの値を取得します。Gets the value of the Placement attached property for an object.

public:
 static System::Windows::Controls::Primitives::PlacementMode GetPlacement(System::Windows::DependencyObject ^ element);
[System.Windows.AttachedPropertyBrowsableForType(typeof(System.Windows.DependencyObject))]
public static System.Windows.Controls.Primitives.PlacementMode GetPlacement (System.Windows.DependencyObject element);
static member GetPlacement : System.Windows.DependencyObject -> System.Windows.Controls.Primitives.PlacementMode
Public Shared Function GetPlacement (element As DependencyObject) As PlacementMode

パラメーター

element
DependencyObject DependencyObject DependencyObject DependencyObject

プロパティ値の読み取り元のオブジェクト。The object from which the property value is read.

戻り値

オブジェクトの Placement プロパティ値。The object's Placement property value.

ToolTipService.Placement添付プロパティの値を取得する方法を次の例に示します。The following example shows how to get the value for the ToolTipService.Placement attached property. メソッドFindNameは、と呼ばellipse2れるオブジェクト () Ellipseを検索します。The FindName method finds the object called ellipse2, which is an Ellipse.

PlacementMode myMode = ToolTipService.GetPlacement(
 (DependencyObject)FindName("ellipse2"));
Dim myMode As PlacementMode = ToolTipService.GetPlacement(CType(FindName("ellipse2"), DependencyObject))

適用対象

こちらもご覧ください