ToolTipService.GetToolTip(DependencyObject) Metoda

Definicja

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

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

Parametry

element
DependencyObject

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

Zwraca

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

Atrybuty

Przykłady

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

target = (UIElement)ToolTipService.GetToolTip(
 (DependencyObject)FindName("ellipse2"));
target = CType(ToolTipService.GetToolTip(CType(FindName("ellipse2"), DependencyObject)), UIElement)

Dotyczy

Zobacz też