ToolTipService.GetPlacement(DependencyObject) 方法

定义

获取对象的附加属性的值 Placement

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);
[<System.Windows.AttachedPropertyBrowsableForType(typeof(System.Windows.DependencyObject))>]
static member GetPlacement : System.Windows.DependencyObject -> System.Windows.Controls.Primitives.PlacementMode
Public Shared Function GetPlacement (element As DependencyObject) As PlacementMode

参数

element
DependencyObject

从中读取属性值的对象。

返回

Placement对象的属性值。

属性

示例

以下示例演示如何获取附加属性的值 ToolTipService.Placement 。 该方法 FindName 查找调用 ellipse2的对象,该对象是一个 Ellipse

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

适用于

另请参阅