268 references to TryGetOwnerAs
System.Windows.Forms (268)
System\Windows\Forms\Accessibility\Control.ControlAccessibleObject.cs (14)
58
=> this.
TryGetOwnerAs
(out Control? owner) ? owner.Name : string.Empty;
65
if (!this.
TryGetOwnerAs
(out Control? owner) || owner.ToolStripControlHost is not ToolStripControlHost host)
85
=> this.
TryGetOwnerAs
(out Control? owner) && owner.GetStyle(ControlStyles.ContainerControl)
122
if (!this.
TryGetOwnerAs
(out Control? owner))
275
if (this.
TryGetOwnerAs
(out Control? owner)
289
&& (!this.
TryGetOwnerAs
(out Control? owner)
312
if (this.
TryGetOwnerAs
(out Control? owner) && owner.AccessibleName is { } name)
325
if (this.
TryGetOwnerAs
(out Control? owner))
349
if (this.
TryGetOwnerAs
(out Control? owner) && owner.GetStyle(ControlStyles.UseTextForAccessibility))
394
if (!this.
TryGetOwnerAs
(out Control? owner) || owner.ParentInternal is not { } parent)
438
if (!this.
TryGetOwnerAs
(out Control? owner)
455
&& (!this.
TryGetOwnerAs
(out Control? owner)
491
if (this.
TryGetOwnerAs
(out Control? owner))
502
=> (this.
TryGetOwnerAs
(out Control? owner) && owner.SupportsUiaProviders && patternId == UIA_PATTERN_ID.UIA_LegacyIAccessiblePatternId)
System\Windows\Forms\Controls\Buttons\ButtonBase.ButtonBaseAccessibleObject.cs (2)
46
public override string? KeyboardShortcut => this.
TryGetOwnerAs
(out ButtonBase? owner)
54
if (!this.
TryGetOwnerAs
(out ButtonBase? owner))
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxAccessibleObject.cs (9)
39
=> this.
TryGetOwnerAs
(out ComboBox? _) || base.IsIAccessibleExSupported();
42
=> patternId == UIA_PATTERN_ID.UIA_ExpandCollapsePatternId && this.
TryGetOwnerAs
(out ComboBox? owner)
67
=> _dropDownButtonUiaProvider ??= this.
TryGetOwnerAs
(out ComboBox? owner) ? new ComboBoxChildDropDownButtonUiaProvider(owner) : null;
90
if (!this.
TryGetOwnerAs
(out ComboBox? owner))
122
UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.
TryGetOwnerAs
(out ComboBox? owner) && owner.Focused),
128
if (!this.
TryGetOwnerAs
(out ComboBox? owner))
200
if (!this.
TryGetOwnerAs
(out ComboBox? owner))
220
if (this.
TryGetOwnerAs
(out ComboBox? owner) && owner.DroppedDown)
235
this.
TryGetOwnerAs
(out ComboBox? owner) && owner.DropDownStyle == ComboBoxStyle.Simple
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxItemAccessibleObjectCollection.cs (1)
21
if (!ContainsKey(key) && _owningComboBoxAccessibleObject.
TryGetOwnerAs
(out ComboBox? owner))
System\Windows\Forms\Controls\DataGridView\DataGridView.AccessibleObject.cs (15)
25
internal override bool IsReadOnly => this.
TryGetOwnerAs
(out DataGridView? owner) ? owner.ReadOnly : base.IsReadOnly;
31
_isModal ??= this.
TryGetOwnerAs
(out DataGridView? owner) && owner.TopMostParent is Form { Modal: true };
53
_topRowAccessibilityObject ??= this.
TryGetOwnerAs
(out DataGridView? owner) ? new(owner) : null;
60
if (index < 0 || !this.
TryGetOwnerAs
(out DataGridView? owner))
114
if (!this.
TryGetOwnerAs
(out DataGridView? owner) || owner.Columns.Count == 0)
142
if (this.
TryGetOwnerAs
(out DataGridView? owner) && owner.Focused && owner.CurrentCell is not null)
214
return (this.
TryGetOwnerAs
(out owner) && owner.AccessibleRole == AccessibleRole.Default)
220
return (VARIANT)(this.
TryGetOwnerAs
(out owner) && (IsModal || RowCount == 0) && owner.Focused);
224
return (VARIANT)(this.
TryGetOwnerAs
(out owner) && owner.CanFocus);
227
if (!this.
TryGetOwnerAs
(out owner))
273
if (!this.
TryGetOwnerAs
(out DataGridView? owner) || !owner.RowHeadersVisible)
290
if (!this.
TryGetOwnerAs
(out DataGridView? owner) || !owner.ColumnHeadersVisible)
315
if (!this.
TryGetOwnerAs
(out DataGridView? owner))
334
return this.
TryGetOwnerAs
(out DataGridView? owner) ? owner.Rows.GetRowCount(DataGridViewElementStates.Visible) : base.RowCount;
342
return this.
TryGetOwnerAs
(out DataGridView? owner) ? owner.Columns.GetColumnCount(DataGridViewElementStates.Visible) : base.ColumnCount;
System\Windows\Forms\Controls\DataGridView\DataGridView.DataGridViewEditingPanelAccessibleObject.cs (3)
24
=> this.
TryGetOwnerAs
(out Panel? owner) ? owner.AccessibilityObject.Bounds : default;
31
internal override int[] RuntimeId => _runtimeId ??= this.
TryGetOwnerAs
(out Panel? owner)
77
UIA_PROPERTY_ID.UIA_AccessKeyPropertyId => this.
TryGetOwnerAs
(out Panel? owner) && owner.AccessibilityObject.KeyboardShortcut is { } shortcut
System\Windows\Forms\Controls\DataGridView\DataGridView.SelectedCellsAccessibleObject.cs (5)
36
_parentAccessibleObject.
TryGetOwnerAs
(out DataGridView? owner) && index >= 0 && index < owner.GetCellCount(DataGridViewElementStates.Selected)
41
_parentAccessibleObject.
TryGetOwnerAs
(out DataGridView? owner)
48
_parentAccessibleObject.
TryGetOwnerAs
(out DataGridView? owner) && owner.CurrentCell is not null && owner.CurrentCell.Selected
59
return _parentAccessibleObject.
TryGetOwnerAs
(out owner) && owner.GetCellCount(DataGridViewElementStates.Selected) > 0
64
return _parentAccessibleObject.
TryGetOwnerAs
(out owner) && owner.GetCellCount(DataGridViewElementStates.Selected) > 0
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxEditingControl.DataGridViewComboBoxEditingControlAccessibleObject.cs (4)
36
if (this.
TryGetOwnerAs
(out Control? owner) && owner is IDataGridViewEditingControl editingControl
50
=> this.
TryGetOwnerAs
(out IDataGridViewEditingControl? owner)
56
UIA_PATTERN_ID.UIA_ExpandCollapsePatternId when this.
TryGetOwnerAs
(out DataGridViewComboBoxEditingControl? owner)
62
=> this.
TryGetOwnerAs
(out DataGridViewComboBoxEditingControl? owner) && owner.DroppedDown
System\Windows\Forms\Controls\DataGridView\DataGridViewTextBoxEditingControl.DataGridViewTextBoxEditingControlAccessibleObject.cs (2)
42
if (this.
TryGetOwnerAs
(out Control? owner) && owner is IDataGridViewEditingControl editingControl
56
this.
TryGetOwnerAs
(out IDataGridViewEditingControl? owner)
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.DateTimePickerAccessibleObject.cs (4)
63
if (this.
TryGetOwnerAs
(out DateTimePicker? owner) && owner.ShowCheckBox && owner.Checked)
91
UIA_PATTERN_ID.UIA_TogglePatternId when this.
TryGetOwnerAs
(out DateTimePicker? owner) && owner.ShowCheckBox => true,
121
=> this.
TryGetOwnerAs
(out DateTimePicker? owner) && owner.Checked ? ToggleState.ToggleState_On : ToggleState.ToggleState_Off;
150
=> this.
TryGetOwnerAs
(out DateTimePicker? owner)
System\Windows\Forms\Controls\Labels\Label.LabelAccessibleObject.cs (2)
16
public override string? KeyboardShortcut => !this.
TryGetOwnerAs
(out Label? owner) || !owner.UseMnemonic ? null : base.KeyboardShortcut;
24
if (!this.
TryGetOwnerAs
(out Label? owner))
System\Windows\Forms\Controls\Labels\LinkLabel.LinkLabelAccessibleObject.cs (4)
29
=> !this.
TryGetOwnerAs
(out LinkLabel? owner) ? null : owner.Links.Count != 0
33
=> !this.
TryGetOwnerAs
(out LinkLabel? owner) ? null : owner.Links.Count != 0
42
this.
TryGetOwnerAs
(out LinkLabel? owner) && index >= 0 && index < GetChildCount()
48
public override int GetChildCount() => this.
TryGetOwnerAs
(out LinkLabel? owner) ? owner.Links.Count : 0;
System\Windows\Forms\Controls\ListBoxes\ListBox.AccessibleObject.cs (9)
49
if (this.
TryGetOwnerAs
(out ListBox? owner) && owner.Focused)
80
int childCount = this.
TryGetOwnerAs
(out ListBox? owner) ? owner.Items.Count : 0;
106
UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => this.
TryGetOwnerAs
(out ListBox? owner)
121
=> this.
TryGetOwnerAs
(out ListBox? _) || base.IsIAccessibleExSupported();
143
if (!this.
TryGetOwnerAs
(out ListBox? owner))
188
if (!this.
TryGetOwnerAs
(out ListBox? owner))
216
return this.
TryGetOwnerAs
(out ListBox? owner) ? owner.Items.Count : 0;
221
if (this.
TryGetOwnerAs
(out ListBox? owner))
235
if (this.
TryGetOwnerAs
(out ListBox? owner))
System\Windows\Forms\Controls\ListView\ListView.ListViewAccessibleObject.cs (13)
40
=> this.
TryGetOwnerAs
(out ListView? owningListView) ? owningListView.Columns.Count : base.ColumnCount;
46
if (!this.
TryGetOwnerAs
(out ListView? owningListView) || !owningListView.GroupsDisplayed)
68
=> this.
TryGetOwnerAs
(out ListView? owningListView) ? owningListView.Items.Count : base.RowCount;
120
if (!this.
TryGetOwnerAs
(out ListView? owningListView) || child is null)
153
internal override int GetChildIndex(AccessibleObject? child) => this.
TryGetOwnerAs
(out ListView? owningListView)
157
private string GetItemStatus() => this.
TryGetOwnerAs
(out ListView? owningListView)
168
if (!this.
TryGetOwnerAs
(out ListView? owningListView))
188
=> this.
TryGetOwnerAs
(out ListView? owningListView) ? (int)owningListView.View : base.GetMultiViewProviderCurrentView();
208
if (!this.
TryGetOwnerAs
(out ListView? owningListView))
230
=> (VARIANT)(int)((this.
TryGetOwnerAs
(out ListView? owningListView) && owningListView.View == View.Details)
262
if (!this.
TryGetOwnerAs
(out ListView? owningListView))
348
this.
TryGetOwnerAs
(out ListView? owningListView)
357
if (!this.
TryGetOwnerAs
(out ListView? owningListView))
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.MonthCalendarAccessibleObject.cs (18)
127
internal MONTH_CALDENDAR_MESSAGES_VIEW CalendarView => this.
TryGetOwnerAs
(out MonthCalendar? owner) ? owner._mcCurView : MONTH_CALDENDAR_MESSAGES_VIEW.MCMV_MONTH;
201
internal DayOfWeek FirstDayOfWeek => this.
TryGetOwnerAs
(out MonthCalendar? owner) ? CastDayToDayOfWeek(owner.FirstDayOfWeek) : CastDayToDayOfWeek(Day.Default);
203
internal bool Focused => this.
TryGetOwnerAs
(out MonthCalendar? owner) && owner.Focused;
206
=> _focusedCellAccessibleObject ??= this.
TryGetOwnerAs
(out MonthCalendar? owner) ? GetCellByDate(owner._focusedDate) : null;
378
=> this.
TryGetOwnerAs
(out MonthCalendar? owner) && owner.IsHandleCreated
429
this.
TryGetOwnerAs
(out MonthCalendar? owner) && owner.AccessibleRole == AccessibleRole.Default
447
if (this.
TryGetOwnerAs
(out MonthCalendar? owner) && owner.GetType().BaseType is Type baseType)
458
internal bool IsEnabled => this.
TryGetOwnerAs
(out MonthCalendar? owner) && owner.Enabled;
471
internal DateTime MinDate => this.
TryGetOwnerAs
(out MonthCalendar? owner) ? owner.MinDate : DateTime.MinValue;
472
internal DateTime MaxDate => this.
TryGetOwnerAs
(out MonthCalendar? owner) ? owner.MaxDate : DateTime.MaxValue;
546
internal SelectionRange SelectionRange => this.
TryGetOwnerAs
(out MonthCalendar? owner) ? owner.SelectionRange : new SelectionRange();
559
internal bool ShowToday => this.
TryGetOwnerAs
(out MonthCalendar? owner) && owner.ShowToday;
561
internal bool ShowWeekNumbers => this.
TryGetOwnerAs
(out MonthCalendar? owner) && owner.ShowWeekNumbers;
563
internal DateTime TodayDate => this.
TryGetOwnerAs
(out MonthCalendar? owner) ? owner.TodayDate : DateTime.Today;
578
if (this.
TryGetOwnerAs
(out owner))
588
if (this.
TryGetOwnerAs
(out owner))
595
if (this.
TryGetOwnerAs
(out owner))
623
if (!this.
TryGetOwnerAs
(out MonthCalendar? owner))
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.MonthCalendarChildAccessibleObject.cs (1)
61
!_monthCalendarAccessibleObject.
TryGetOwnerAs
(out Control? owner)
System\Windows\Forms\Controls\ProgressBar\ProgressBar.ProgressBarAccessibleObject.cs (3)
50
internal override double Maximum => this.
TryGetOwnerAs
(out ProgressBar? owner) ? owner.Maximum : 0;
52
internal override double Minimum => this.
TryGetOwnerAs
(out ProgressBar? owner) ? owner.Minimum : 0;
56
internal override double RangeValue => this.
TryGetOwnerAs
(out ProgressBar? owner) ? owner.Value : 0;
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.PropertyGridAccessibleObject.cs (2)
105
if (!this.
TryGetOwnerAs
(out PropertyGrid? owningPropertyGrid) || index < 0)
159
if (!this.
TryGetOwnerAs
(out PropertyGrid? owningPropertyGrid))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CategoryGridEntry.CategoryGridEntryAccessibleObject.cs (3)
33
if (!this.
TryGetOwnerAs
(out CategoryGridEntry? owner)
39
if (!parent.
TryGetOwnerAs
(out PropertyGridView? gridView)
73
|| !this.
TryGetOwnerAs
(out CategoryGridEntry? owner))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CommandsPane.CommandsPaneAccessibleObject.cs (1)
51
=> this.
TryGetOwnerAs
(out CommandsPane? owner)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridEntry.GridEntryAccessibleObject.cs (26)
29
=> PropertyGridView is not null && PropertyGridView.IsHandleCreated && this.
TryGetOwnerAs
(out GridEntry? owner)
37
if (!this.
TryGetOwnerAs
(out GridEntry? owner) || !owner.Expandable)
52
internal override bool CanGetDefaultActionInternal => !this.
TryGetOwnerAs
(out GridEntry? owner) || !owner.Expandable;
55
=> this.
TryGetOwnerAs
(out GridEntry? owner) ? owner.PropertyDescription : string.Empty;
60
=> !this.
TryGetOwnerAs
(out GridEntry? owner) ? ExpandCollapseState.ExpandCollapseState_Collapsed : owner.Expandable
64
public override string? Help => this.
TryGetOwnerAs
(out GridEntry? owner) ? owner.PropertyDescription : string.Empty;
68
public override string? Name => this.
TryGetOwnerAs
(out GridEntry? owner) ? owner.PropertyLabel : null;
73
this.
TryGetOwnerAs
(out GridEntry? owner) ? owner.OwnerGridView?.AccessibilityObject : null;
83
if (PropertyGridView is null || !PropertyGridView.IsHandleCreated || !this.
TryGetOwnerAs
(out GridEntry? owner))
143
get => this.
TryGetOwnerAs
(out GridEntry? owner) ? owner.GetPropertyTextValue() : null;
146
if (this.
TryGetOwnerAs
(out GridEntry? owner))
169
|| !this.
TryGetOwnerAs
(out GridEntry? owner))
174
if (!parent.
TryGetOwnerAs
(out PropertyGridView? gridView))
209
this.
TryGetOwnerAs
(out GridEntry? owner)
222
propertyGridViewAccessibleObject.
TryGetOwnerAs
(out PropertyGridView? owner);
235
if (PropertyGridView is not null && PropertyGridView.IsHandleCreated && this.
TryGetOwnerAs
(out GridEntry? owner))
246
=> this.
TryGetOwnerAs
(out GridEntry? owner) ? owner.HasFocus ? this : null : null;
254
|| !this.
TryGetOwnerAs
(out GridEntry? owner))
283
if (PropertyGridView is null || !PropertyGridView.IsHandleCreated || !this.
TryGetOwnerAs
(out GridEntry? owner))
310
if (this.
TryGetOwnerAs
(out GridEntry? owner) && owner.Expandable && owner.Expanded)
318
if (this.
TryGetOwnerAs
(out GridEntry? owner) && owner.Expandable && !owner.Expanded)
329
if (this.
TryGetOwnerAs
(out GridEntry? owner) && owner.ParentGridEntry is { } parentGridEntry)
356
UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.
TryGetOwnerAs
(out GridEntry? owner) && owner.HasFocus),
363
internal override bool IsIAccessibleExSupported() => this.
TryGetOwnerAs
(out GridEntry? owner) && owner.Expandable;
375
if (this.
TryGetOwnerAs
(out GridEntry? owner) && owner.Expandable)
386
if (!this.
TryGetOwnerAs
(out GridEntry? owner) || owner.OwnerGrid is null || owner.OwnerGrid.SortedByCategories)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\HelpPane.HelpPaneAccessibleObject.cs (1)
54
if (this.
TryGetOwnerAs
(out Control? owner))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.PropertyDescriptorGridEntryAccessibleObject.cs (12)
19
&& this.
TryGetOwnerAs
(out PropertyDescriptorGridEntry? owner)
29
if (!this.
TryGetOwnerAs
(out PropertyDescriptorGridEntry? owner))
100
if (!this.
TryGetOwnerAs
(out PropertyDescriptorGridEntry? owner))
165
if (!this.
TryGetOwnerAs
(out PropertyDescriptorGridEntry? owner))
263
=> (VARIANT)(this.
TryGetOwnerAs
(out PropertyDescriptorGridEntry? owner) && !owner.IsPropertyReadOnly),
276
this.
TryGetOwnerAs
(out PropertyDescriptorGridEntry? owner)
285
|| !this.
TryGetOwnerAs
(out PropertyDescriptorGridEntry? owner))
308
if (!this.
TryGetOwnerAs
(out PropertyDescriptorGridEntry? owner))
319
&& propertyGridViewAccessibleObject.
TryGetOwnerAs
(out PropertyGridView? gridViewOwner)
329
if (!this.
TryGetOwnerAs
(out PropertyDescriptorGridEntry? owner))
340
&& propertyGridViewAccessibleObject.
TryGetOwnerAs
(out PropertyGridView? gridViewOwner)
347
? propertyGridViewAccessibleObject.
TryGetOwnerAs
(out PropertyGridView? owner) ? owner : null
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.GridViewListBoxAccessibleObject.cs (2)
30
if (!this.
TryGetOwnerAs
(out GridViewListBox? owner)
55
this.
TryGetOwnerAs
(out GridViewListBox? owner)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.GridViewTextBox.GridViewTextBoxAccessibleObject.cs (6)
42
if (!this.
TryGetOwnerAs
(out GridViewTextBox? owner)
62
this.
TryGetOwnerAs
(out GridViewTextBox? owner)
68
UIA_PROPERTY_ID.UIA_ClassNamePropertyId when this.
TryGetOwnerAs
(out object? owner) => (VARIANT)owner.GetType().ToString(),
70
UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.
TryGetOwnerAs
(out Control? owner) && owner.Focused),
91
if (!this.
TryGetOwnerAs
(out GridViewTextBox? owner))
107
=> !this.
TryGetOwnerAs
(out GridViewTextBox? owner)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.PropertyGridViewAccessibleObject.cs (16)
57
this.
TryGetOwnerAs
(out PropertyGridView? owner)
79
=> this.
TryGetOwnerAs
(out PropertyGridView? owner) && owner.OwnerGrid is { } ownerGrid && ownerGrid.SortedByCategories;
85
if (!this.
TryGetOwnerAs
(out PropertyGridView? owner))
104
if (!this.
TryGetOwnerAs
(out PropertyGridView? owner))
116
if (!this.
TryGetOwnerAs
(out PropertyGridView? owner))
135
=> !this.
TryGetOwnerAs
(out PropertyGridView? owner) ? null : GetCategory(owner.TopLevelGridEntries!.Count - 1);
255
if (current.ChildCount <= 0 || !this.
TryGetOwnerAs
(out PropertyGridView? _))
286
if (current.ChildCount <= 0 || !this.
TryGetOwnerAs
(out PropertyGridView? _))
317
if (!this.
TryGetOwnerAs
(out PropertyGridView? owner))
341
if (!this.
TryGetOwnerAs
(out PropertyGridView? owner))
358
if (!this.
TryGetOwnerAs
(out PropertyGridView? owner))
382
if (!this.
TryGetOwnerAs
(out PropertyGridView? owner))
401
this.
TryGetOwnerAs
(out PropertyGridView? owner) && owner.AccessibilityGetGridEntries() is { } entries
407
if (!this.
TryGetOwnerAs
(out PropertyGridView? owner))
422
=> !this.
TryGetOwnerAs
(out PropertyGridView? owner) ? null : owner.SelectedGridEntry?.AccessibilityObject;
475
if (!this.
TryGetOwnerAs
(out PropertyGridView? owner)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridToolStrip.PropertyGridToolStripAccessibleObject.cs (2)
55
if (this.
TryGetOwnerAs
(out PropertyGridToolStrip? owner) && owner.AccessibleName is { } name)
68
(!this.
TryGetOwnerAs
(out PropertyGridToolStrip? owner) || owner.AccessibleName is null)
System\Windows\Forms\Controls\TabControl\TabControl.TabControlAccessibleObject.cs (1)
131
UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.
TryGetOwnerAs
(out TabControl? owner) && owner.Focused),
System\Windows\Forms\Controls\TabControl\TabPage.TabPageAccessibleObject.cs (3)
24
this.
TryGetOwnerAs
(out TabPage? owningTabPage) ? owningTabPage.ParentInternal as TabControl : null;
67
UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.
TryGetOwnerAs
(out TabPage? owningTabPage) && owningTabPage.Focused),
84
if (!this.
TryGetOwnerAs
(out TabPage? owningTabPage) || OwningTabControl is null || owningTabPage != OwningTabControl.SelectedTab)
System\Windows\Forms\Controls\TextBox\MaskedTextBox.MaskedTextBoxAccessibleObject.cs (2)
16
get => !this.
TryGetOwnerAs
(out MaskedTextBox? owner) || string.IsNullOrEmpty(owner.Mask)
26
=> this.
TryGetOwnerAs
(out MaskedTextBox? owner) ? owner.WindowText : string.Empty;
System\Windows\Forms\Controls\TextBox\TextBox.TextBoxAccessibleObject.cs (1)
21
string? placeholderText = this.
TryGetOwnerAs
(out TextBox? owner) ? owner.PlaceholderText : null;
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseAccessibleObject.cs (6)
30
if (this.
TryGetOwnerAs
(out TextBoxBase? owner))
57
internal override bool IsReadOnly => this.
TryGetOwnerAs
(out TextBoxBase? owner) && owner.ReadOnly;
70
public override string? Value => this.
TryGetOwnerAs
(out TextBoxBase? owner) && !owner.PasswordProtect ? ValueInternal : SR.AccessDenied;
73
=> this.
TryGetOwnerAs
(out Control? owner) && owner.Text is { } text ? text : string.Empty;
89
if (this.
TryGetOwnerAs
(out Control? owner))
121
public override string? KeyboardShortcut => this.
TryGetOwnerAs
(out TextBoxBase? owner)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.ToolStripAccessibleObject.cs (7)
43
if (!this.
TryGetOwnerAs
(out ToolStrip? owner) || owner.Items is null)
123
if (!this.
TryGetOwnerAs
(out ToolStrip? owner) || owner.Items is null)
152
if (!this.
TryGetOwnerAs
(out ToolStrip? owner) || fragmentIndex < 0)
261
if (!this.
TryGetOwnerAs
(out ToolStrip? owner) || owner.OverflowItems is null)
271
if (!this.
TryGetOwnerAs
(out ToolStrip? owner) || owner.DisplayedItems is null)
281
if (!this.
TryGetOwnerAs
(out ToolStrip? owner) || owner.Items is null)
326
if (!this.
TryGetOwnerAs
(out ToolStrip? owner) || owner.Items is null)
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxControlAccessibleObject.cs (2)
26
if (this.
TryGetOwnerAs
(out ToolStripComboBoxControl? owner))
38
this.
TryGetOwnerAs
(out ToolStripComboBoxControl? owner)
System\Windows\Forms\Controls\ToolStrips\ToolStripContainer.ToolStripContainerAccessibleObject.cs (1)
20
UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.
TryGetOwnerAs
(out ToolStripContainer? owner) && owner.Focused),
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.ToolStripDropDownAccessibleObject.cs (4)
31
return this.
TryGetOwnerAs
(out ToolStripDropDown? owner)
39
if (this.
TryGetOwnerAs
(out ToolStripDropDown? owner))
48
&& this.
TryGetOwnerAs
(out ToolStripDropDown? owner)
54
this.
TryGetOwnerAs
(out ToolStripDropDown? owner);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.ToolStripDropDownMenuAccessibleObject.cs (2)
19
NavigateDirection.NavigateDirection_Parent when this.
TryGetOwnerAs
(out ToolStripDropDownMenu? owner)
28
UIA_PROPERTY_ID.UIA_IsContentElementPropertyId => (VARIANT)this.
TryGetOwnerAs
(out ContextMenuStrip? _),
System\Windows\Forms\Controls\ToolStrips\ToolStripOverflow.ToolStripOverflowAccessibleObject.cs (3)
17
=> this.
TryGetOwnerAs
(out ToolStripOverflow? owner) && (index >= 0 || index < owner.DisplayedItems.Count)
24
=> this.
TryGetOwnerAs
(out ToolStripOverflow? owner)
31
NavigateDirection.NavigateDirection_Parent when this.
TryGetOwnerAs
(out ToolStripOverflow? owner)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.ToolStripPanelAccessibleObject.cs (1)
21
UIA_PROPERTY_ID.UIA_IsKeyboardFocusablePropertyId => (VARIANT)(this.
TryGetOwnerAs
(out ToolStripPanel? owner) && owner.CanFocus),
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControlAccessibleObject.cs (1)
25
UIA_PROPERTY_ID.UIA_IsOffscreenPropertyId when this.
TryGetOwnerAs
(out TextBox? owner) => (VARIANT)GetIsOffscreenPropertyValue(owner.ToolStripControlHost?.Placement, Bounds),
System\Windows\Forms\Controls\TrackBar\TrackBar.TrackBarAccessibleObject.cs (7)
37
public override string? DefaultAction => this.
TryGetOwnerAs
(out TrackBar? owner)
54
=> _firstButtonAccessibleObject ??= (this.
TryGetOwnerAs
(out TrackBar? owner) ? new(owner) : null);
57
=> this.
TryGetOwnerAs
(out TrackBar? owner) && owner.RightToLeft == RightToLeft.Yes && owner.RightToLeftLayout;
60
=> _lastButtonAccessibleObject ??= (this.
TryGetOwnerAs
(out TrackBar? owner) ? new(owner) : null);
63
=> this.
TryGetOwnerAs
(out TrackBar? owner) && owner.RightToLeft == RightToLeft.Yes && !owner.RightToLeftLayout;
66
=> _thumbAccessibleObject ??= (this.
TryGetOwnerAs
(out TrackBar? owner) ? new(owner) : null);
155
UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.
TryGetOwnerAs
(out TrackBar? owner) && owner.Focused),
System\Windows\Forms\Controls\TrackBar\TrackBar.TrackBarChildAccessibleObject.cs (4)
50
internal virtual bool IsDisplayed => this.
TryGetOwnerAs
(out TrackBar? trackbar) && trackbar.Visible;
54
internal TrackBarAccessibleObject? ParentInternal => this.
TryGetOwnerAs
(out TrackBar? owner)
61
(int)(this.
TryGetOwnerAs
(out TrackBar? owner) ? owner.InternalHandle : HWND.Null),
77
UIA_PROPERTY_ID.UIA_IsEnabledPropertyId => (VARIANT)(this.
TryGetOwnerAs
(out TrackBar? owner) && owner.Enabled),
System\Windows\Forms\Controls\TrackBar\TrackBar.TrackBarFirstButtonAccessibleObject.cs (2)
21
public override string? Name => !this.
TryGetOwnerAs
(out TrackBar? owner) || ParentInternal is not { } parent
33
if (!this.
TryGetOwnerAs
(out TrackBar? owner)
System\Windows\Forms\Controls\TrackBar\TrackBar.TrackBarLastButtonAccessibleObject.cs (1)
21
public override string? Name => !this.
TryGetOwnerAs
(out TrackBar? owner) || ParentInternal is not { } parent
System\Windows\Forms\Controls\TreeView\TreeView.TreeViewAccessibleObject.cs (6)
34
=> index >= 0 && index < GetChildCount() && this.
TryGetOwnerAs
(out TreeView? owningTreeView)
41
this.
TryGetOwnerAs
(out TreeView? owningTreeView) ? owningTreeView.Nodes.Count : base.GetChildCount();
50
UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.
TryGetOwnerAs
(out TreeView? owningTreeView)
52
UIA_PROPERTY_ID.UIA_IsEnabledPropertyId => (VARIANT)(this.
TryGetOwnerAs
(out TreeView? owningTreeView) && owningTreeView.Enabled),
81
if (!this.
TryGetOwnerAs
(out TreeView? owningTreeView))
110
internal override bool IsSelectionRequired => this.
TryGetOwnerAs
(out TreeView? owningTreeView) &&
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownBaseAccessibleObject.cs (1)
15
if (!this.
TryGetOwnerAs
(out UpDownBase? owner))
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownButtons.UpDownButtonsAccessibleObject.cs (1)
86
=> this.
TryGetOwnerAs
(out UpDownButtons? owner) ? owner.AccessibilityObject : null;
System\Windows\Forms\Controls\WebBrowser\WebBrowser.WebBrowserAccessibleObject.cs (1)
19
UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.
TryGetOwnerAs
(out WebBrowser? owner) && owner.Focused),
System\Windows\Forms\Form.AccessibleObject.cs (1)
39
UIA_PROPERTY_ID.UIA_IsDialogPropertyId => (VARIANT)(this.
TryGetOwnerAs
(out Form? owner) && owner.Modal),
System\Windows\Forms\Internal\IOwnedObject.cs (1)
12
/// The owner of this object. Use <see cref="OwnedObjectExtensions.
TryGetOwnerAs
"/> for all access.
System\Windows\Forms\Layout\Containers\SplitContainer.SplitContainerAccessibleObject.cs (2)
20
UIA_PROPERTY_ID.UIA_AutomationIdPropertyId when this.
TryGetOwnerAs
(out SplitContainer? owner) => (VARIANT)owner.Name,
21
UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.
TryGetOwnerAs
(out SplitContainer? owner) && owner.Focused),
System\Windows\Forms\Printing\PrintPreviewControl.PrintPreviewControlAccessibleObject.cs (13)
20
=> !this.
TryGetOwnerAs
(out PrintPreviewControl? owner) ? default : propertyID switch
30
if (!this.
TryGetOwnerAs
(out PrintPreviewControl? owner))
42
if (!this.
TryGetOwnerAs
(out PrintPreviewControl? owner))
63
UIA_PATTERN_ID.UIA_ScrollPatternId => this.
TryGetOwnerAs
(out PrintPreviewControl? owner)
72
if (!this.
TryGetOwnerAs
(out PrintPreviewControl? owner))
97
if (!this.
TryGetOwnerAs
(out PrintPreviewControl? owner))
154
if (!this.
TryGetOwnerAs
(out PrintPreviewControl? owner))
179
if (this.
TryGetOwnerAs
(out PrintPreviewControl? owner) && owner._hScrollBar.Visible)
193
if (this.
TryGetOwnerAs
(out PrintPreviewControl? owner) && owner._vScrollBar.Visible)
203
public double HorizontalViewSize => this.
TryGetOwnerAs
(out PrintPreviewControl? owner)
206
public double VerticalViewSize => this.
TryGetOwnerAs
(out PrintPreviewControl? owner)
210
this.
TryGetOwnerAs
(out PrintPreviewControl? owner) && owner._hScrollBar.Visible;
213
this.
TryGetOwnerAs
(out PrintPreviewControl? owner) && owner._vScrollBar.Visible;
System\Windows\Forms\Printing\PrintPreviewControl.ScrollBarAccessibleObject.cs (2)
17
this.
TryGetOwnerAs
(out ScrollBar? scrollBar) && scrollBar.Parent is PrintPreviewControl printPreviewControl
25
if (!this.
TryGetOwnerAs
(out ScrollBar? scrollBar) || scrollBar.Parent is not PrintPreviewControl printPreviewControl)
System\Windows\Forms\Scrolling\ScrollBar.ScrollBarAccessibleObject.cs (12)
25
=> _firstLineButtonAccessibleObject ??= this.
TryGetOwnerAs
(out ScrollBar? owner) ? new(owner) : null;
28
=> _firstPageButtonAccessibleObject ??= this.
TryGetOwnerAs
(out ScrollBar? owner) ? new(owner) : null;
33
=> _lastLineButtonAccessibleObject ??= this.
TryGetOwnerAs
(out ScrollBar? owner) ? new(owner) : null;
36
=> _lastPageButtonAccessibleObject ??= this.
TryGetOwnerAs
(out ScrollBar? owner) ? new(owner) : null;
39
=> _thumbAccessibleObject ??= this.
TryGetOwnerAs
(out ScrollBar? owner) ? new(owner) : null;
44
internal int UIMaximum => this.
TryGetOwnerAs
(out ScrollBar? owner) ? owner.Maximum - owner.LargeChange + 1 : 0;
146
UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.
TryGetOwnerAs
(out ScrollBar? owner) && owner.Focused),
159
internal override double RangeValue => this.
TryGetOwnerAs
(out ScrollBar? owner) ? owner.Value : base.RangeValue;
161
internal override double LargeChange => this.
TryGetOwnerAs
(out ScrollBar? owner) ? owner.LargeChange : base.LargeChange;
163
internal override double SmallChange => this.
TryGetOwnerAs
(out ScrollBar? owner) ? owner.SmallChange : base.SmallChange;
165
internal override double Maximum => this.
TryGetOwnerAs
(out ScrollBar? owner) ? owner.Maximum : base.Maximum;
167
internal override double Minimum => this.
TryGetOwnerAs
(out ScrollBar? owner) ? owner.Minimum : base.Minimum;