System.Windows.Automation.AutomationElement.GetRawPattern C# (CSharp) Method

GetRawPattern() private method

private GetRawPattern ( AutomationPattern pattern, bool isCached ) : object
pattern AutomationPattern
isCached bool
return object
        internal object GetRawPattern(AutomationPattern pattern, bool isCached)
        {
            try
            {

                if (isCached)
                {
                    return this._obj.GetCachedPattern(pattern.Id);
                }
                else
                {
                    return this._obj.GetCurrentPattern(pattern.Id);
                }
            }
            catch (System.Runtime.InteropServices.COMException e)
            {
                Exception newEx; if (Utility.ConvertException(e, out newEx)) { throw newEx; } else { throw; }
            }

        }

Usage Example

Example #1
0
 internal new static object Wrap(AutomationElement el, object pattern, bool cached)
 {
     TablePattern result = null;
     if (pattern != null)
     {
         UIAutomationClient.IUIAutomationGridPattern gridPattern =
             (UIAutomationClient.IUIAutomationGridPattern)el.GetRawPattern(GridPattern.Pattern, cached);
         if (gridPattern != null)
         {
             result = new TablePattern(el, (UIAutomationClient.IUIAutomationTablePattern)pattern,
                 gridPattern, cached);
         }
     }
     return result;
 }
All Usage Examples Of System.Windows.Automation.AutomationElement::GetRawPattern