コード例 #1
0
        //------------------------------------------------------
        //
        //  Public Methods
        //
        //------------------------------------------------------

        #region Public Methods
        /// <summary>
        /// Obtain the AutomationElement at an zero based absolute position in the grid.
        /// Where 0,0 is top left
        /// </summary>
        /// <param name="row">Row of item to get</param>
        /// <param name="column">Column of item to get</param>
        ///
        /// <outside_see conditional="false">
        /// This API does not work inside the secure execution environment.
        /// <exception cref="System.Security.Permissions.SecurityPermission"/>
        /// </outside_see>
        public AutomationElement GetItem(int row, int column)
        {
            SafeNodeHandle hNode = UiaCoreApi.GridPattern_GetItem(_hPattern, row, column);

            return(AutomationElement.Wrap(hNode));
        }