public SimpleSearchCondition(PropertyValue propertyValueDelegate,
                              AutomationElementProperty automationElementProperty)
 {
     this.propertyValueDelegate     = propertyValueDelegate;
     this.automationElementProperty = automationElementProperty;
 }
 public static SearchCondition CreateForNativeProperty(AutomationProperty automationProperty, object value)
 {
     var automationElementProperty = new AutomationElementProperty(value, automationProperty.ProgrammaticName, automationProperty);
     return new SimpleSearchCondition(automationElement => automationElement.GetCurrentPropertyValue(automationProperty), automationElementProperty);
 }
 private bool Equals(AutomationElementProperty other)
 {
     return(Equals(other.Value, Value) && Equals(other.propertyType.Id, propertyType.Id) &&
            Equals(other.propertyType.Name, propertyType.Name));
 }
Exemple #4
0
        public static SearchCondition CreateForNativeProperty(PropertyId automationProperty, object value)
        {
            var automationElementProperty = new AutomationElementProperty(value, automationProperty.Name, automationProperty);

            return(new SimpleSearchCondition(automationElement => automationElement.BasicAutomationElement.GetPropertyValue(automationProperty), automationElementProperty));
        }
        public static SearchCondition CreateForNativeProperty(AutomationProperty automationProperty, object value)
        {
            var automationElementProperty = new AutomationElementProperty(value, automationProperty.ProgrammaticName, automationProperty);

            return(new SimpleSearchCondition(automationElement => automationElement.GetCurrentPropertyValue(automationProperty), automationElementProperty));
        }
 private bool Equals(AutomationElementProperty other)
 {
     return Equals(other.Value, Value) && Equals(other.propertyType.Id, propertyType.Id) &&
            Equals(other.propertyType.ProgrammaticName, other.propertyType.ProgrammaticName);
 }
 public SimpleSearchCondition(PropertyValue propertyValueDelegate,
     AutomationElementProperty automationElementProperty)
 {
     this.propertyValueDelegate = propertyValueDelegate;
     this.automationElementProperty = automationElementProperty;
 }