Taal

AutomationElement.LocalizedControlTypeProperty Veld

Definitie

Identificeert de LocalizedControlType eigenschap in de lokale taal.

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

Waarde van veld

Voorbeelden

In het volgende voorbeeld wordt de huidige waarde van de eigenschap opgehaald. De standaardwaarde wordt geretourneerd als het element er geen opgeeft.

string localizedType =
    autoElement.GetCurrentPropertyValue(AutomationElement.LocalizedControlTypeProperty) as string;
Dim localizedType As String = _
    Cstr(autoElement.GetCurrentPropertyValue(AutomationElement.LocalizedControlTypeProperty))

In het volgende voorbeeld wordt de huidige waarde van de eigenschap opgehaald, maar wordt aangegeven dat als het element zelf geen waarde voor de eigenschap biedt, NotSupported moet worden geretourneerd in plaats van een standaardwaarde.

string localizedType1;
object localizedTypeNoDefault =
    autoElement.GetCurrentPropertyValue(AutomationElement.LocalizedControlTypeProperty, true);
if (localizedTypeNoDefault == AutomationElement.NotSupported)
{
    localizedType1 = "Unknown type.";
}
else
{
    localizedType1 = localizedTypeNoDefault as string;
}
Dim localizedType1 As String
Dim localizedTypeNoDefault As Object = autoElement.GetCurrentPropertyValue(AutomationElement.LocalizedControlTypeProperty, True)
If localizedTypeNoDefault Is AutomationElement.NotSupported Then
    localizedType1 = "Unknown type."
Else
    localizedType1 = CStr(localizedTypeNoDefault)
End If

Opmerkingen

Deze id wordt gebruikt door UI Automation clienttoepassingen. UI Automation providers moeten de equivalente id in AutomationElementIdentifiers gebruiken.

Deze eigenschap kan ook worden opgehaald uit de Current of Cached eigenschappen.

Een provider is vereist om deze eigenschap beschikbaar te maken wanneer deze een aangepast besturingselement vertegenwoordigt dat geen goed gedefinieerd besturingselementtype heeft.

Retourwaarden van de eigenschap zijn van het type String. De standaardwaarde voor de eigenschap is een lege tekenreeks.

Van toepassing op

Zie ook