ToolTipService.GetPlacement(DependencyObject) Metoda

Definicja

Pobiera wartość dołączonej Placement właściwości dla obiektu.

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

Parametry

element
DependencyObject

Obiekt, z którego jest odczytywana wartość właściwości.

Zwraca

PlacementMode

Wartość właściwości obiektu Placement .

Atrybuty

Przykłady

W poniższym przykładzie pokazano, jak uzyskać wartość dołączonej ToolTipService.Placement właściwości. Metoda FindName znajduje obiekt o nazwie ellipse2, który jest .Ellipse

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

Dotyczy

Zobacz też