AutomationElement.HelpTextProperty Pole

Definicja

Identyfikuje HelpText właściwość .

public: static initonly System::Windows::Automation::AutomationProperty ^ HelpTextProperty;
public static readonly System.Windows.Automation.AutomationProperty HelpTextProperty;
 staticval mutable HelpTextProperty : System.Windows.Automation.AutomationProperty
Public Shared ReadOnly HelpTextProperty As AutomationProperty 

Wartość pola

Przykłady

Poniższy przykład pobiera bieżącą wartość właściwości . Wartość domyślna jest zwracana, jeśli element go nie podaje.

// elementList is an AutomationElement.
string helpString =
    elementList.GetCurrentPropertyValue(AutomationElement.HelpTextProperty) as string;
' elementList is an AutomationElement.
Dim helpString As String = _
    CStr(elementList.GetCurrentPropertyValue(AutomationElement.HelpTextProperty))

Poniższy przykład pobiera bieżącą wartość właściwości, ale określa, że jeśli sam element nie podaje wartości właściwości, NotSupported ma zostać zwrócony zamiast wartości domyślnej.

// elementList is an AutomationElement.
object help = elementList.GetCurrentPropertyValue(AutomationElement.HelpTextProperty, true);
if (help == AutomationElement.NotSupported)
{
    help = "No help available";
}
string helpText = (string)help;
' elementList is an AutomationElement.
Dim help As Object = elementList.GetCurrentPropertyValue(AutomationElement.HelpTextProperty, True)
If help Is AutomationElement.NotSupported Then
    help = "No help available"
End If
Dim helpText As String = CStr(help)

Uwagi

Ten identyfikator jest używany przez aplikacje klienckie automatyzacja interfejsu użytkownika. automatyzacja interfejsu użytkownika dostawcy powinni używać równoważnego identyfikatora w elemencie AutomationElementIdentifiers.

Tę właściwość można również pobrać z Current właściwości lub Cached .

Te informacje są zwykle uzyskiwane z etykietek narzędzi określonych przez dostawców.

Zwracane wartości właściwości są typu String. Wartość domyślna właściwości to pusty ciąg.

Dotyczy

Zobacz też