Hi,I use IRawElementProviderFragment for testing,but I can't get UIAutomationElement's BoundingRectangle in win7.When I try to get it,the process stop working.The following code is how I get the BoundingRectangle in my tableCell using the interface of IRawElementProviderFragment: /// <summary> /// Gets the bounding rectangle of this element. /// </summary> /// <value></value> /// <returns>The bounding rectangle, in screen coordinates.</returns> System.Windows.Rect IRawElementProviderFragment.BoundingRectangle { get { var cellPoint = _grid.GetCellDisplayRectangle(_cell.ColumnIndex, _cell.RowIndex, true); var formPoint = new Point(cellPoint.X, cellPoint.Y); _grid.Invoke(new Action(() => formPoint = _grid.PointToScreen(formPoint))); var topPoint = new CursorPoint() { X = formPoint.X, Y = formPoint.Y }; var widthPoint = new CursorPoint() {X = cellPoint.Width + formPoint.X, Y = formPoint.Y}; var heightPoint = new CursorPoint() {X = formPoint.X, Y = formPoint.Y + cellPoint.Height}; _grid.Invoke(new Action(() => { try { LogicalToPhysicalPoint(_grid.Handle, ref topPoint); LogicalToPhysicalPoint(_grid.Handle, ref widthPoint); LogicalToPhysicalPoint(_grid.Handle, ref heightPoint); } catch (Exception) { ; } })); var width = widthPoint.X - topPoint.X; var height = heightPoint.Y - topPoint.Y; return new System.Windows.Rect(topPoint.X, topPoint.Y, width, height); } }The following code is how I get the BoundingRectangle:System.Windows.Rect boundingRect1;object boundingRectNoDefault = autoElement.GetCurrentPropertyValue(AutomationElement.BoundingRectangleProperty, true);if (boundingRectNoDefault == AutomationElement.NotSupported){ return null;}else{ boundingRect1 = (System.Windows.Rect)boundingRectNoDefault;}And I notice the article about the dpi.But it still dosen't work. Best wishes.
Visual Studio/Team Foundation Server/.NET Framework Tooling Version
Steps to reproduce
Product Language
Operating System
Operating System Language
Actual results
Expected results