AutomationElement.IsEnabledProperty フィールド

定義

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

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 

フィールド値

AutomationProperty

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

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

注釈

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

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

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

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

適用対象

こちらもご覧ください