Beispiel #1
0
            /// <summary>
            ///      Navigate to the next or previous grid entry.
            /// </summary>
            public override AccessibleObject Navigate(AccessibleNavigation navdir)
            {
                switch (navdir)
                {
                case AccessibleNavigation.Right:
                case AccessibleNavigation.Next:
                    if (column < owner.AccessibleObject.GetChildCount() - 1)
                    {
                        return(owner.AccessibleObject.GetChild(column + 1));
                    }
                    else
                    {
                        AccessibleObject o = DataGrid.AccessibilityObject.GetChild(1 + owner.dgTable.GridColumnStyles.Count + owner.RowNumber + 1);
                        if (o != null)
                        {
                            return(o.Navigate(AccessibleNavigation.FirstChild));
                        }
                    }
                    break;

                case AccessibleNavigation.Down:
                    return(DataGrid.AccessibilityObject.GetChild(1 + owner.dgTable.GridColumnStyles.Count + owner.RowNumber + 1).Navigate(AccessibleNavigation.FirstChild));

                case AccessibleNavigation.Up:
                    return(DataGrid.AccessibilityObject.GetChild(1 + owner.dgTable.GridColumnStyles.Count + owner.RowNumber - 1).Navigate(AccessibleNavigation.FirstChild));

                case AccessibleNavigation.Left:
                case AccessibleNavigation.Previous:
                    if (column > 0)
                    {
                        return(owner.AccessibleObject.GetChild(column - 1));
                    }
                    else
                    {
                        AccessibleObject o = DataGrid.AccessibilityObject.GetChild(1 + owner.dgTable.GridColumnStyles.Count + owner.RowNumber - 1);
                        if (o != null)
                        {
                            return(o.Navigate(AccessibleNavigation.LastChild));
                        }
                    }
                    break;

                case AccessibleNavigation.FirstChild:
                case AccessibleNavigation.LastChild:

                    break;
                }

                return(null);
            }
Beispiel #2
0
            public override AccessibleObject Navigate(AccessibleNavigation navdir)
            {
                switch (navdir)
                {
                case AccessibleNavigation.Up:
                    return(this.DataGrid.AccessibilityObject.GetChild(((1 + this.owner.dgTable.GridColumnStyles.Count) + this.owner.RowNumber) - 1).Navigate(AccessibleNavigation.FirstChild));

                case AccessibleNavigation.Down:
                    return(this.DataGrid.AccessibilityObject.GetChild(((1 + this.owner.dgTable.GridColumnStyles.Count) + this.owner.RowNumber) + 1).Navigate(AccessibleNavigation.FirstChild));

                case AccessibleNavigation.Left:
                case AccessibleNavigation.Previous:
                    if (this.column <= 0)
                    {
                        AccessibleObject child = this.DataGrid.AccessibilityObject.GetChild(((1 + this.owner.dgTable.GridColumnStyles.Count) + this.owner.RowNumber) - 1);
                        if (child != null)
                        {
                            return(child.Navigate(AccessibleNavigation.LastChild));
                        }
                        break;
                    }
                    return(this.owner.AccessibleObject.GetChild(this.column - 1));

                case AccessibleNavigation.Right:
                case AccessibleNavigation.Next:
                    if (this.column >= (this.owner.AccessibleObject.GetChildCount() - 1))
                    {
                        AccessibleObject obj2 = this.DataGrid.AccessibilityObject.GetChild(((1 + this.owner.dgTable.GridColumnStyles.Count) + this.owner.RowNumber) + 1);
                        if (obj2 == null)
                        {
                            break;
                        }
                        return(obj2.Navigate(AccessibleNavigation.FirstChild));
                    }
                    return(this.owner.AccessibleObject.GetChild(this.column + 1));
                }
                return(null);
            }