AutomationElement.IsPasswordProperty 欄位

定義

識別 IsPassword 屬性。

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

欄位值

AutomationProperty

範例

下列範例會擷取 屬性的目前值。

bool isTextPassword = (bool)
   autoElement.GetCurrentPropertyValue(AutomationElement.IsPasswordProperty);
Dim isTextPassword As Boolean = CBool(autoElement.GetCurrentPropertyValue(AutomationElement.IsPasswordProperty))

備註

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

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

這個屬性的傳回值是 Boolean 。 它會傳 true 回 ,表示內容受到保護,否則 false 為 。

適用於

另請參閱