AutomationElement.NotSupported 欄位

定義

指出不支援某屬性。

public: static initonly System::Object ^ NotSupported;
public static readonly object NotSupported;
 staticval mutable NotSupported : obj
Public Shared ReadOnly NotSupported As Object 

欄位值

範例

下列範例會擷 AutomationElement 取 的解說文字屬性,指定 NotSupported 如果控制項不支援該屬性,則應該傳回 。

// 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)

備註

UI 自動化用戶端應用程式會使用此識別碼。 使用者介面自動化提供者應該使用 中的 AutomationElementIdentifiers 對等識別碼。

適用於

另請參閱