Bagikan melalui


IGridProvider.GetItem Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Retrieves the UI automation provider for the specified cell.

Namespace:  System.Windows.Automation.Provider
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'Declaration
Function GetItem ( _
    row As Integer, _
    column As Integer _
) As IRawElementProviderSimple
IRawElementProviderSimple GetItem(
    int row,
    int column
)

Parameters

  • row
    Type: System.Int32
    The ordinal number of the row that contains the cell.
  • column
    Type: System.Int32
    The ordinal number of the column that contains the cell.

Return Value

Type: System.Windows.Automation.Provider.IRawElementProviderSimple
The UI automation provider for the specified cell.

Remarks

Grid coordinates are zero-based. The upper-left cell (or upper-right cell, depending on locale) has coordinates (0,0).

If a cell is empty, a UI Automation provider must still be returned in order to support the ContainingGrid property for that cell. This is possible when the layout of child elements in the grid is similar to a ragged array.

Hidden rows and columns can be loaded in the tree, depending on the provider implementation. Therefore, they will be reflected in the RowCount and ColumnCount properties. If the hidden rows and columns have not yet been loaded, they should not be counted.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.