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