AutomationElement.IsPasswordProperty 欄位

定義

識別 IsPassword 屬性。Identifies the IsPassword property.

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

範例

下列範例會抓取屬性的目前值。The following example retrieves the current value of the property.

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

備註

消費者介面自動化用戶端應用程式會使用此識別碼。This identifier is used by UI Automation client applications. 消費者介面自動化提供者應該在中使用對等的識別碼 AutomationElementIdentifiersUI Automation providers should use the equivalent identifier in AutomationElementIdentifiers.

這個屬性也可以從 Current 或屬性中抓取 CachedThis property can also be retrieved from the Current or Cached properties.

這個屬性的傳回值為 BooleanThe return value for this property is a Boolean. 它會傳回 true 以表示內容受到保護,否則為 falseIt returns true to indicate that the content is protected; otherwise false.

適用於