internal override UiaCore.IRawElementProviderSimple[] GetRowHeaders() { if (!owner.RowHeadersVisible) { return(null); } UiaCore.IRawElementProviderSimple[] result = new UiaCore.IRawElementProviderSimple[owner.Rows.Count]; for (int i = 0; i < owner.Rows.Count; i++) { result[i] = owner.Rows[i].HeaderCell.AccessibilityObject; } return(result); }
internal override UiaCore.IRawElementProviderSimple[]? GetColumnHeaders() { if (!_ownerDataGridView.ColumnHeadersVisible) { return(null); } UiaCore.IRawElementProviderSimple[] result = new UiaCore.IRawElementProviderSimple[_ownerDataGridView.Columns.Count]; for (int i = 0; i < _ownerDataGridView.Columns.Count; i++) { result[i] = _ownerDataGridView.Columns[i].HeaderCell.AccessibilityObject; } return(result); }
internal override UiaCore.IRawElementProviderSimple[]? GetRowHeaders() { if (!_ownerDataGridView.RowHeadersVisible) { return(null); } UiaCore.IRawElementProviderSimple[] result = new UiaCore.IRawElementProviderSimple[RowCount]; for (int i = 0; i < RowCount; i++) { int rowIndex = _ownerDataGridView.Rows.DisplayIndexToRowIndex(i); result[i] = _ownerDataGridView.Rows[rowIndex].HeaderCell.AccessibilityObject; } return(result); }
internal override UiaCore.IRawElementProviderSimple[]? GetColumnHeaders() { if (!_ownerDataGridView.ColumnHeadersVisible) { return(null); } UiaCore.IRawElementProviderSimple[] result = new UiaCore.IRawElementProviderSimple[ColumnCount]; for (int i = 0; i < ColumnCount; i++) { int columnIndex = _ownerDataGridView.Columns.ActualDisplayIndexToColumnIndex(i, DataGridViewElementStates.Visible); result[i] = _ownerDataGridView.Columns[columnIndex].HeaderCell.AccessibilityObject; } return(result); }
public override UiaCore.ITextRangeProvider?RangeFromChild(UiaCore.IRawElementProviderSimple childElement) { // We don't have any children so this call returns null. Debug.Fail("Text edit control cannot have a child element."); return(null); }
/// <summary> /// Exposes a text range that contains the text that is the target of the annotation associated with the specified annotation element. /// </summary> /// <param name="annotationElement"> /// The provider for an element that implements the IAnnotationProvider interface. /// The annotation element is a sibling of the element that implements the <see cref="UiaCore.ITextProvider2"/> interface for the document. /// </param> /// <returns> /// A text range that contains the annotation target text. /// </returns> public override UiaCore.ITextRangeProvider RangeFromAnnotation(UiaCore.IRawElementProviderSimple annotationElement) { return(new UiaTextRange(_owningComboBox.ChildEditAccessibleObject, this, start: 0, end: 0)); }
/// <summary> /// Exposes a text range that contains the text that is the target of the annotation associated with the specified annotation element. /// </summary> /// <param name="annotationElement"> /// The provider for an element that implements the IAnnotationProvider interface. /// The annotation element is a sibling of the element that implements the <see cref="UiaCore.ITextProvider2"/> interface for the document. /// </param> /// <returns> /// A text range that contains the annotation target text. /// </returns> public override UiaCore.ITextRangeProvider RangeFromAnnotation(UiaCore.IRawElementProviderSimple annotationElement) { return(new UiaTextRange(_owningTextBoxBase.AccessibilityObject, this, start: 0, end: 0)); }
internal override UiaCore.ITextRangeProvider GetRangeFromAnnotation(UiaCore.IRawElementProviderSimple annotationElement) => _textProvider.RangeFromAnnotation(annotationElement);
internal override UiaCore.ITextRangeProvider?GetTextRangeFromChild(UiaCore.IRawElementProviderSimple childElement) => _textProvider.RangeFromChild(childElement);
/// <summary> /// Exposes a text range that contains the text that is the target of the annotation associated with the specified annotation element. /// </summary> /// <param name="annotationElement"> /// The provider for an element that implements the IAnnotationProvider interface. /// The annotation element is a sibling of the element that implements the <see cref="UiaCore.ITextProvider2"/> interface for the document. /// </param> /// <returns> /// A text range that contains the annotation target text. /// </returns> public override UiaCore.ITextRangeProvider RangeFromAnnotation(UiaCore.IRawElementProviderSimple annotationElement) { InternalAccessibleObject internalAccessibleObject = new(_owningComboBox.ChildEditAccessibleObject); return(new UiaTextRange(internalAccessibleObject, this, 0, 0)); }
public abstract UiaCore.ITextRangeProvider? RangeFromAnnotation(UiaCore.IRawElementProviderSimple annotationElement);