/// <summary> /// Checks if the given pattern is available for the element via UIA method. /// Does not work with cached elements and might be unreliable. /// </summary> public bool IsPatternSupportedDirect(AutomationPattern pattern) { return(this.GetSupportedPatternsDirect().Contains(pattern)); }
/// <summary> /// Checks if the given pattern is available for the element via properties. /// </summary> public bool IsPatternSupported(AutomationPattern patternId) { return(this.AutomationElement.TryGetCurrentPattern(patternId, out _)); }