作者:VB.NET开发
项目:System.Windows.Automation.Provide
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