ToolTipService.GetPlacementRectangle(DependencyObject) Metoda

Definicja

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

public:
 static System::Windows::Rect GetPlacementRectangle(System::Windows::DependencyObject ^ element);
[System.Windows.AttachedPropertyBrowsableForType(typeof(System.Windows.DependencyObject))]
public static System.Windows.Rect GetPlacementRectangle (System.Windows.DependencyObject element);
[<System.Windows.AttachedPropertyBrowsableForType(typeof(System.Windows.DependencyObject))>]
static member GetPlacementRectangle : System.Windows.DependencyObject -> System.Windows.Rect
Public Shared Function GetPlacementRectangle (element As DependencyObject) As Rect

Parametry

element
DependencyObject

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

Zwraca

Rect

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

Atrybuty

Przykłady

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

Rect myRect = ToolTipService.GetPlacementRectangle(
 (DependencyObject)FindName("ellipse2"));
Dim myRect As Rect = ToolTipService.GetPlacementRectangle(CType(FindName("ellipse2"), DependencyObject))

Dotyczy

Zobacz też