AutomationElement.IsRequiredForFormProperty 欄位

定義

識別 IsRequiredForForm 屬性。

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

欄位值

AutomationProperty

範例

下列範例會擷取 屬性的目前值。 如果專案未提供預設值,則會傳回預設值。

bool isRequired = (bool)
   autoElement.GetCurrentPropertyValue(AutomationElement.IsRequiredForFormProperty);
Dim isRequired As Boolean = _
    CBool(autoElement.GetCurrentPropertyValue(AutomationElement.IsRequiredForFormProperty))

備註

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

您也可以從 CurrentCached 屬性擷取這個屬性。

此屬性的傳回值的類型 Boolean 為 ,預設值為 false

適用於

另請參閱