言語

AutomationElement.IsEnabledProperty フィールド

定義

IsEnabledによって参照されるユーザー インターフェイス (UI) 項目が有効かどうかを指定するAutomationElement プロパティを識別します。

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

フィールド値

次の例では、プロパティの現在の値を取得します。 要素に既定値が指定されていない場合は、既定値が返されます。

bool isControlEnabled = (bool)
   autoElement.GetCurrentPropertyValue(AutomationElement.IsEnabledProperty);
Dim isControlEnabled As Boolean = _
    CBool(autoElement.GetCurrentPropertyValue(AutomationElement.IsEnabledProperty))

注釈

この識別子は、クライアント アプリケーションUI オートメーション使用されます。 UI オートメーションプロバイダーは、AutomationElementIdentifiers で同等の識別子を使用する必要があります。

このプロパティは、 Current または Cached プロパティから取得することもできます。

プロパティの戻り値は、 Boolean型です。 プロパティの既定値は false です。

コントロールの有効な状態が falseされると、子コントロールも有効になっていないと見なされます。 親コントロールの状態が変更されたときに、子要素からプロパティ変更イベントが発生することは想定しないでください。

適用対象

こちらもご覧ください