ValuePattern.IsReadOnlyProperty 필드

정의

IsReadOnly 속성을 식별합니다.

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

필드 값

예제

다음 예제에서는 루트 요소를 루트의 후손이 속성 조건 집합을 만족 하는 UI 자동화 요소의 컬렉션을 반환 하는 함수에 전달 됩니다.

///--------------------------------------------------------------------
/// <summary>
/// Finds all automation elements that satisfy 
/// the specified condition(s).
/// </summary>
/// <param name="targetApp">
/// The automation element from which to start searching.
/// </param>
/// <returns>
/// A collection of automation elements satisfying 
/// the specified condition(s).
/// </returns>
///--------------------------------------------------------------------
private AutomationElementCollection FindAutomationElement(
    AutomationElement targetApp)
{
    if (targetApp == null)
    {
        throw new ArgumentException("Root element cannot be null.");
    }

    PropertyCondition conditionIsReadOnly =
        new PropertyCondition(
        ValuePattern.IsReadOnlyProperty, false);

    return targetApp.FindAll(
        TreeScope.Descendants, conditionIsReadOnly);
}
'''--------------------------------------------------------------------
''' <summary>
''' Finds all automation elements that satisfy 
''' the specified condition(s).
''' </summary>
''' <param name="targetApp">
''' The automation element from which to start searching.
''' </param>
''' <returns>
''' A collection of automation elements satisfying 
''' the specified condition(s).
''' </returns>
'''--------------------------------------------------------------------
Private Function FindAutomationElement( _
ByVal targetApp As AutomationElement) As AutomationElementCollection
    If targetApp Is Nothing Then
        Throw New ArgumentException("Root element cannot be null.")
    End If

    Dim conditionIsReadOnly As New PropertyCondition( _
    ValuePattern.IsReadOnlyProperty, False)

    Return targetApp.FindAll(TreeScope.Descendants, conditionIsReadOnly)

End Function 'FindAutomationElement

설명

이 식별자는 UI 자동화 클라이언트 애플리케이션에서 사용 됩니다. UI 자동화 공급자의 해당 필드를 사용 해야 ValuePatternIdentifiers합니다.

컨트롤 있어야 해당 IsEnabledProperty 로 설정 true 및 해당 IsReadOnlyProperty 로 설정 false 클라이언트에 대 한 호출을 시도 하기 전에 SetValue입니다.

적용 대상

추가 정보