AutomationElement.ItemStatusProperty フィールド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ItemStatus プロパティを識別します。このプロパティは、複合アイテムの視覚的表現の状態を指定します。
public: static initonly System::Windows::Automation::AutomationProperty ^ ItemStatusProperty;
public static readonly System.Windows.Automation.AutomationProperty ItemStatusProperty;
staticval mutable ItemStatusProperty : System.Windows.Automation.AutomationProperty
Public Shared ReadOnly ItemStatusProperty As AutomationProperty
フィールド値
例
次の例では、プロパティの現在の値を取得します。 要素に既定値が指定されていない場合は、既定値が返されます。
string itemStatus =
autoElement.GetCurrentPropertyValue(AutomationElement.ItemStatusProperty) as string;
Dim itemStatus As String = _
CStr(autoElement.GetCurrentPropertyValue(AutomationElement.ItemStatusProperty))
次の例では、プロパティの現在の値を取得しますが、要素自体がプロパティの値を提供しない場合は、既定値ではなく NotSupported を返すように指定します。
string itemStatus1;
object itemStatusNoDefault =
autoElement.GetCurrentPropertyValue(AutomationElement.ItemStatusProperty, true);
if (itemStatusNoDefault == AutomationElement.NotSupported)
{
// TODO Handle the case where you do not wish to proceed using the default value.
}
else
{
itemStatus1 = itemStatusNoDefault as string;
}
Dim itemStatus1 As String
Dim itemStatusNoDefault As Object = _
autoElement.GetCurrentPropertyValue(AutomationElement.ItemStatusProperty, True)
If itemStatusNoDefault Is AutomationElement.NotSupported Then
' TODO Handle the case where you do not wish to proceed using the default value.
Else
itemStatus1 = CStr(itemStatusNoDefault)
End If
注釈
この識別子は、クライアント アプリケーションUI オートメーション使用されます。 UI オートメーションプロバイダーは、AutomationElementIdentifiers で同等の識別子を使用する必要があります。
戻り値は、コントロール定義の Stringです。 既定値は空の文字列です。