System.Windows.Automation.GridPattern.GetItem C# (CSharp) Method

GetItem() public method

public GetItem ( int row, int column ) : AutomationElement
row int
column int
return AutomationElement
        public AutomationElement GetItem(int row, int column)
        {
            try
            {
                // Looks like we have to cache explicitly here, since GetItem doesn't
                // take a cache request.
                return AutomationElement.Wrap(this._pattern.GetItem(row, column)).GetUpdatedCache(CacheRequest.Current);
            }
            catch (System.Runtime.InteropServices.COMException e)
            {
                Exception newEx; if (Utility.ConvertException(e, out newEx)) { throw newEx; } else { throw; }
            }
        }

Usage Example

Ejemplo n.º 1
0
 private IEnumerable<AutomationElement> GetColumnValuesForRow(GridPattern gridPattern, Int32 rowIndex)
 {
     for (int y = 0; y < gridPattern.Current.ColumnCount; y++)
     {
         var cellElement = gridPattern.GetItem(rowIndex, y);
         yield return TreeWalker.RawViewWalker.GetFirstChild(cellElement);
     }
 }
All Usage Examples Of System.Windows.Automation.GridPattern::GetItem