IRawElementProviderSimple.GetPropertyValue(Int32) Yöntem
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
UI Otomasyonu sağlayıcısı tarafından desteklenen bir özelliğin değerini alır.
public:
System::Object ^ GetPropertyValue(int propertyId);
public object GetPropertyValue(int propertyId);
abstract member GetPropertyValue : int -> obj
Public Function GetPropertyValue (propertyId As Integer) As Object
- propertyId
- Int32
Özellik tanımlayıcısı.
Özellik değeri veya null
özellik bu sağlayıcı tarafından desteklenmiyorsa veya NotSupported hiç desteklenmiyorsa.
Aşağıdaki kod örneği, özel düğme denetimi için uygulamasını GetPropertyValue gösterir.
object IRawElementProviderSimple.GetPropertyValue(int propertyId)
{
if (propertyId == AutomationElementIdentifiers.NameProperty.Id)
{
return "RootButtonControl";
}
else if (propertyId == AutomationElementIdentifiers.ClassNameProperty.Id)
{
return "RootButtonControlClass";
}
else if (propertyId == AutomationElementIdentifiers.ControlTypeProperty.Id)
{
return ControlType.Button.Id;
}
else if (propertyId == AutomationElementIdentifiers.IsContentElementProperty.Id)
{
return false;
}
else if (propertyId == AutomationElementIdentifiers.IsControlElementProperty.Id)
{
return true;
}
else
{
return null;
}
}
Function GetPropertyValue(ByVal propertyId As Integer) As Object _
Implements IRawElementProviderSimple.GetPropertyValue
If propertyId = AutomationElementIdentifiers.NameProperty.Id Then
Return "RootButtonControl"
ElseIf propertyId = AutomationElementIdentifiers.ClassNameProperty.Id Then
Return "RootButtonControlClass"
ElseIf propertyId = AutomationElementIdentifiers.ControlTypeProperty.Id Then
Return ControlType.Button.Id
ElseIf propertyId = AutomationElementIdentifiers.IsContentElementProperty.Id Then
Return False
ElseIf propertyId = AutomationElementIdentifiers.IsControlElementProperty.Id Then
Return True
Else
Return Nothing
End If
End Function 'IRawElementProviderSimple.GetPropertyValue
Sağlayıcının yalnızca özellik değerini açıkça gizlemesi ve isteğin diğer sağlayıcılara geçirilmemesi durumunda döndürülmesi NotSupported gerekir.
Ürün | Sürümler |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |
.NET geri bildirimi
.NET, açık kaynak bir projedir. Geri bildirim sağlamak için bir bağlantı seçin: