2 writes to _owner
System.Windows.Forms (2)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.DataGridViewCellAccessibleObject.cs (2)
26_owner = owner; 101_owner = value;
156 references to _owner
System.Windows.Forms (156)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.DataGridViewCellAccessibleObject.cs (156)
50if (_owner is null) 55if (_owner.OwningColumn is null || _owner.OwningRow is null) 60int rowIndex = _owner.DataGridView is null 62: _owner.DataGridView.Rows.GetVisibleIndex(_owner.OwningRow) + RowStartIndex; 64string name = string.Format(SR.DataGridView_AccDataGridViewCellName, _owner.OwningColumn.HeaderText, rowIndex).Trim(); 66if (_owner.OwningColumn.SortMode != DataGridViewColumnSortMode.NotSortable) 68DataGridViewCell dataGridViewCell = _owner; 93get => _owner; 96if (_owner is not null) 111if (_owner is null) 116return _owner.OwningRow?.AccessibilityObject; 128if (_owner is null) 134if (_owner.DataGridView is not null && _owner == _owner.DataGridView.CurrentCell) 139if (_owner.Selected) 144if (_owner.ReadOnly) 149if (_owner.DataGridView?.IsHandleCreated != true) 155if (_owner.OwningColumn is not null && _owner.OwningRow is not null) 157cellBounds = _owner.DataGridView.GetCellDisplayRectangle(_owner.OwningColumn.Index, _owner.OwningRow.Index, cutOverflow: false); 159else if (_owner.OwningRow is not null) 161cellBounds = _owner.DataGridView.GetCellDisplayRectangle(-1, _owner.OwningRow.Index, cutOverflow: false); 163else if (_owner.OwningColumn is not null) 165cellBounds = _owner.DataGridView.GetCellDisplayRectangle(_owner.OwningColumn.Index, -1, cutOverflow: false); 169cellBounds = _owner.DataGridView.GetCellDisplayRectangle(-1, -1, cutOverflow: false); 172if (!cellBounds.IntersectsWith(_owner.DataGridView.ClientRectangle)) 185if (_owner is null) 190object? formattedValue = _owner.FormattedValue; 200else if (_owner.OwningColumn is not null) 202TypeConverter? converter = _owner.FormattedValueTypeConverter; 219if (_owner is null) 224if (_owner is DataGridViewHeaderCell || _owner.ReadOnly || _owner.DataGridView is null || _owner.OwningRow is null) 229if (_owner.DataGridView.IsCurrentCellInEditMode) 233_owner.DataGridView.EndEdit(); 236DataGridViewCellStyle dataGridViewCellStyle = _owner.InheritedStyle; 239object? formattedValue = _owner.GetFormattedValue( 241_owner.OwningRow.Index, 248_owner.Value = _owner.ParseFormattedValue( 262if (_owner is null) 267DataGridViewCell dataGridViewCell = _owner; 312if (_owner is null) 318|| _owner.DataGridView is null 319|| !_owner.DataGridView.IsHandleCreated 320|| _owner.OwningColumn is null) 327Rectangle columnRect = _owner.DataGridView.RectangleToScreen( 328_owner.DataGridView.GetColumnDisplayRectangle(_owner.ColumnIndex, cutOverflow: false)); 335if (_owner.DataGridView.RowHeadersVisible) 337if (_owner.DataGridView.RightToLeft == RightToLeft.Yes) 339rightToLeftRowHeadersWidth = _owner.DataGridView.RowHeadersWidth; 343leftToRightRowHeadersWidth = _owner.DataGridView.RowHeadersWidth; 375if (_owner is DataGridViewButtonCell 392if (_owner is null) 397if (_owner.DataGridView is not null && 398_owner.DataGridView.EditingControl is not null && 399_owner.DataGridView.IsCurrentCellInEditMode && 400_owner.DataGridView.CurrentCell == _owner && 403return _owner.DataGridView.EditingControl.AccessibilityObject; 413if (_owner is null) 418if (_owner.DataGridView is not null && 419_owner.DataGridView.EditingControl is not null && 420_owner.DataGridView.IsCurrentCellInEditMode && 421_owner.DataGridView.CurrentCell == _owner) 437if (_owner is null) 442if (_owner.DataGridView?.IsHandleCreated != true || _owner.OwningColumn is null || _owner.OwningRow is null) 450return _owner.DataGridView.RightToLeft == RightToLeft.No 458return _owner.DataGridView.RightToLeft == RightToLeft.No 466if (_owner.OwningRow.Index == _owner.DataGridView.Rows.GetFirstRow(DataGridViewElementStates.Visible)) 468return _owner.DataGridView.ColumnHeadersVisible 469? _owner.OwningColumn.HeaderCell.AccessibilityObject // Return the column header accessible object 474int previousVisibleRow = _owner.DataGridView.Rows.GetPreviousRow(_owner.OwningRow.Index, DataGridViewElementStates.Visible); 475return _owner.DataGridView.Rows[previousVisibleRow].Cells[_owner.OwningColumn.Index].AccessibilityObject; 479if (_owner.OwningRow.Index == _owner.DataGridView.Rows.GetLastRow(DataGridViewElementStates.Visible)) 485int nextVisibleRow = _owner.DataGridView.Rows.GetNextRow(_owner.OwningRow.Index, DataGridViewElementStates.Visible); 486return _owner.DataGridView.Rows[nextVisibleRow].Cells[_owner.OwningColumn.Index].AccessibilityObject; 496Debug.Assert(_owner is not null); 497Debug.Assert(_owner.DataGridView is not null); 498Debug.Assert(_owner.OwningColumn is not null); 499Debug.Assert(_owner.OwningRow is not null); 501if (_owner.OwningColumn == _owner.DataGridView.Columns.GetFirstColumn(DataGridViewElementStates.Visible)) 506AccessibleObject? previousRow = _owner.OwningRow.AccessibilityObject.Navigate(AccessibleNavigation.Previous); 518return _owner.DataGridView.RowHeadersVisible ? _owner.OwningRow.AccessibilityObject.GetChild(0) : null; 523int previousVisibleColumnIndex = _owner.DataGridView.Columns.GetPreviousColumn( 524_owner.OwningColumn, 527return _owner.OwningRow.Cells[previousVisibleColumnIndex].AccessibilityObject; 533Debug.Assert(_owner is not null); 534Debug.Assert(_owner.DataGridView is not null); 535Debug.Assert(_owner.OwningColumn is not null); 536Debug.Assert(_owner.OwningRow is not null); 538if (_owner.OwningColumn == _owner.DataGridView.Columns.GetLastColumn( 545AccessibleObject? nextRow = _owner.OwningRow.AccessibilityObject.Navigate(AccessibleNavigation.Next); 548return _owner.DataGridView.RowHeadersVisible ? nextRow.GetChild(1) : nextRow.GetChild(0); 556int nextVisibleColumnIndex = _owner.DataGridView.Columns.GetNextColumn( 557_owner.OwningColumn, 560return _owner.OwningRow.Cells[nextVisibleColumnIndex].AccessibilityObject; 566if (_owner is null) 571if (_owner.DataGridView?.IsHandleCreated != true) 578_owner.DataGridView.Focus(); 583_owner.Selected = true; 584_owner.DataGridView.CurrentCell = _owner; // Do not change old selection 590_owner.Selected = true; 596_owner.Selected = false; 611if (_owner?.DataGridView?.IsHandleCreated != true) 636internal override IRawElementProviderFragmentRoot.Interface? FragmentRoot => _owner?.DataGridView?.AccessibilityObject; 640if (_owner is null) 645if (_owner.DataGridView?.IsHandleCreated != true || _owner.OwningColumn is null || _owner.OwningRow is null) 653return _owner.OwningRow.AccessibilityObject; 663if (_owner.DataGridView.CurrentCell == _owner && 664_owner.DataGridView.IsCurrentCellInEditMode && 665_owner.DataGridView.EditingControl is not null) 688=> (VARIANT)ComHelpers.GetComPointer<IUnknown>(_owner?.DataGridView?.AccessibilityObject), 690UIA_PROPERTY_ID.UIA_IsEnabledPropertyId => (VARIANT)(_owner?.DataGridView?.Enabled ?? false), 706&& _owner?.ColumnIndex != -1 && _owner?.RowIndex != -1) 718if (_owner is { OwningRow.HasHeaderCell: true, DataGridView: { IsHandleCreated: true, RowHeadersVisible: true } }) 720return [_owner.OwningRow.HeaderCell.AccessibilityObject]; 728if (_owner is { OwningColumn.HasHeaderCell: true, DataGridView: { IsHandleCreated: true, ColumnHeadersVisible: true } }) 730return [_owner.OwningColumn.HeaderCell.AccessibilityObject]; 737=> _owner?.OwningRow?.Visible is true && _owner.DataGridView is not null 738? _owner.DataGridView.Rows.GetVisibleIndex(_owner.OwningRow) 742=> _owner?.OwningColumn?.Visible is true && _owner.DataGridView is not null 743? _owner.DataGridView.Columns.GetVisibleIndex(_owner.OwningColumn) 746internal override IRawElementProviderSimple.Interface? ContainingGrid => _owner?.DataGridView?.AccessibilityObject; 748internal override bool IsReadOnly => _owner?.ReadOnly ?? false;