AutomationElement.IsOffscreenProperty フィールド

定義

IsOffscreenユーザー インターフェイス (UI) 項目が画面上に表示されるかどうかを示す プロパティを識別します。

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

フィールド値

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

bool isControlOffscreen = (bool)
   autoElement.GetCurrentPropertyValue(AutomationElement.IsOffscreenProperty);
Dim isControlOffscreen As Boolean = _
    CBool(autoElement.GetCurrentPropertyValue(AutomationElement.IsOffscreenProperty))

次の例では、 プロパティの現在の値を取得しますが、要素自体がプロパティの値を提供しない場合は、 NotSupported 既定値ではなく を返すように指定します。

bool isControlOffscreen1;
object isOffscreenNoDefault =
    autoElement.GetCurrentPropertyValue(AutomationElement.IsOffscreenProperty, true);
if (isOffscreenNoDefault == AutomationElement.NotSupported)
{
    // TODO Handle the case where you do not wish to proceed using the default value.
}
else
{
    isControlOffscreen1 = (bool)isOffscreenNoDefault;
}
Dim isControlOffscreen1 As Boolean
Dim isOffscreenNoDefault As Object = autoElement.GetCurrentPropertyValue(AutomationElement.IsOffscreenProperty, True)
If isOffscreenNoDefault Is AutomationElement.NotSupported Then
    ' TODO Handle the case where you do not wish to proceed using the default value.
Else
    isControlOffscreen1 = CBool(isOffscreenNoDefault)
End If

注釈

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

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

戻り値は 型 Booleanで、既定値は です false

このプロパティ trueが の場合の詳細については、「」を参照してください IsOffscreen

適用対象

こちらもご覧ください