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; 65if (!this.TryGetOwnerAs(out Control? owner) || owner.ToolStripControlHost is not ToolStripControlHost host) 85=> this.TryGetOwnerAs(out Control? owner) && owner.GetStyle(ControlStyles.ContainerControl) 122if (!this.TryGetOwnerAs(out Control? owner)) 275if (this.TryGetOwnerAs(out Control? owner) 289&& (!this.TryGetOwnerAs(out Control? owner) 312if (this.TryGetOwnerAs(out Control? owner) && owner.AccessibleName is { } name) 325if (this.TryGetOwnerAs(out Control? owner)) 349if (this.TryGetOwnerAs(out Control? owner) && owner.GetStyle(ControlStyles.UseTextForAccessibility)) 394if (!this.TryGetOwnerAs(out Control? owner) || owner.ParentInternal is not { } parent) 438if (!this.TryGetOwnerAs(out Control? owner) 455&& (!this.TryGetOwnerAs(out Control? owner) 491if (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)
46public override string? KeyboardShortcut => this.TryGetOwnerAs(out ButtonBase? owner) 54if (!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; 90if (!this.TryGetOwnerAs(out ComboBox? owner)) 122UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.TryGetOwnerAs(out ComboBox? owner) && owner.Focused), 128if (!this.TryGetOwnerAs(out ComboBox? owner)) 200if (!this.TryGetOwnerAs(out ComboBox? owner)) 220if (this.TryGetOwnerAs(out ComboBox? owner) && owner.DroppedDown) 235this.TryGetOwnerAs(out ComboBox? owner) && owner.DropDownStyle == ComboBoxStyle.Simple
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxItemAccessibleObjectCollection.cs (1)
21if (!ContainsKey(key) && _owningComboBoxAccessibleObject.TryGetOwnerAs(out ComboBox? owner))
System\Windows\Forms\Controls\DataGridView\DataGridView.AccessibleObject.cs (15)
25internal 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; 60if (index < 0 || !this.TryGetOwnerAs(out DataGridView? owner)) 114if (!this.TryGetOwnerAs(out DataGridView? owner) || owner.Columns.Count == 0) 142if (this.TryGetOwnerAs(out DataGridView? owner) && owner.Focused && owner.CurrentCell is not null) 214return (this.TryGetOwnerAs(out owner) && owner.AccessibleRole == AccessibleRole.Default) 220return (VARIANT)(this.TryGetOwnerAs(out owner) && (IsModal || RowCount == 0) && owner.Focused); 224return (VARIANT)(this.TryGetOwnerAs(out owner) && owner.CanFocus); 227if (!this.TryGetOwnerAs(out owner)) 273if (!this.TryGetOwnerAs(out DataGridView? owner) || !owner.RowHeadersVisible) 290if (!this.TryGetOwnerAs(out DataGridView? owner) || !owner.ColumnHeadersVisible) 315if (!this.TryGetOwnerAs(out DataGridView? owner)) 334return this.TryGetOwnerAs(out DataGridView? owner) ? owner.Rows.GetRowCount(DataGridViewElementStates.Visible) : base.RowCount; 342return 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; 31internal override int[] RuntimeId => _runtimeId ??= this.TryGetOwnerAs(out Panel? owner) 77UIA_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 59return _parentAccessibleObject.TryGetOwnerAs(out owner) && owner.GetCellCount(DataGridViewElementStates.Selected) > 0 64return _parentAccessibleObject.TryGetOwnerAs(out owner) && owner.GetCellCount(DataGridViewElementStates.Selected) > 0
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxEditingControl.DataGridViewComboBoxEditingControlAccessibleObject.cs (4)
36if (this.TryGetOwnerAs(out Control? owner) && owner is IDataGridViewEditingControl editingControl 50=> this.TryGetOwnerAs(out IDataGridViewEditingControl? owner) 56UIA_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)
42if (this.TryGetOwnerAs(out Control? owner) && owner is IDataGridViewEditingControl editingControl 56this.TryGetOwnerAs(out IDataGridViewEditingControl? owner)
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.DateTimePickerAccessibleObject.cs (4)
63if (this.TryGetOwnerAs(out DateTimePicker? owner) && owner.ShowCheckBox && owner.Checked) 91UIA_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)
16public override string? KeyboardShortcut => !this.TryGetOwnerAs(out Label? owner) || !owner.UseMnemonic ? null : base.KeyboardShortcut; 24if (!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 42this.TryGetOwnerAs(out LinkLabel? owner) && index >= 0 && index < GetChildCount() 48public override int GetChildCount() => this.TryGetOwnerAs(out LinkLabel? owner) ? owner.Links.Count : 0;
System\Windows\Forms\Controls\ListBoxes\ListBox.AccessibleObject.cs (9)
49if (this.TryGetOwnerAs(out ListBox? owner) && owner.Focused) 80int childCount = this.TryGetOwnerAs(out ListBox? owner) ? owner.Items.Count : 0; 106UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => this.TryGetOwnerAs(out ListBox? owner) 121=> this.TryGetOwnerAs(out ListBox? _) || base.IsIAccessibleExSupported(); 143if (!this.TryGetOwnerAs(out ListBox? owner)) 188if (!this.TryGetOwnerAs(out ListBox? owner)) 216return this.TryGetOwnerAs(out ListBox? owner) ? owner.Items.Count : 0; 221if (this.TryGetOwnerAs(out ListBox? owner)) 235if (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; 46if (!this.TryGetOwnerAs(out ListView? owningListView) || !owningListView.GroupsDisplayed) 68=> this.TryGetOwnerAs(out ListView? owningListView) ? owningListView.Items.Count : base.RowCount; 120if (!this.TryGetOwnerAs(out ListView? owningListView) || child is null) 153internal override int GetChildIndex(AccessibleObject? child) => this.TryGetOwnerAs(out ListView? owningListView) 157private string GetItemStatus() => this.TryGetOwnerAs(out ListView? owningListView) 168if (!this.TryGetOwnerAs(out ListView? owningListView)) 188=> this.TryGetOwnerAs(out ListView? owningListView) ? (int)owningListView.View : base.GetMultiViewProviderCurrentView(); 208if (!this.TryGetOwnerAs(out ListView? owningListView)) 230=> (VARIANT)(int)((this.TryGetOwnerAs(out ListView? owningListView) && owningListView.View == View.Details) 262if (!this.TryGetOwnerAs(out ListView? owningListView)) 348this.TryGetOwnerAs(out ListView? owningListView) 357if (!this.TryGetOwnerAs(out ListView? owningListView))
System\Windows\Forms\Controls\MonthCalendar\MonthCalendar.MonthCalendarAccessibleObject.cs (18)
127internal MONTH_CALDENDAR_MESSAGES_VIEW CalendarView => this.TryGetOwnerAs(out MonthCalendar? owner) ? owner._mcCurView : MONTH_CALDENDAR_MESSAGES_VIEW.MCMV_MONTH; 201internal DayOfWeek FirstDayOfWeek => this.TryGetOwnerAs(out MonthCalendar? owner) ? CastDayToDayOfWeek(owner.FirstDayOfWeek) : CastDayToDayOfWeek(Day.Default); 203internal 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 429this.TryGetOwnerAs(out MonthCalendar? owner) && owner.AccessibleRole == AccessibleRole.Default 447if (this.TryGetOwnerAs(out MonthCalendar? owner) && owner.GetType().BaseType is Type baseType) 458internal bool IsEnabled => this.TryGetOwnerAs(out MonthCalendar? owner) && owner.Enabled; 471internal DateTime MinDate => this.TryGetOwnerAs(out MonthCalendar? owner) ? owner.MinDate : DateTime.MinValue; 472internal DateTime MaxDate => this.TryGetOwnerAs(out MonthCalendar? owner) ? owner.MaxDate : DateTime.MaxValue; 546internal SelectionRange SelectionRange => this.TryGetOwnerAs(out MonthCalendar? owner) ? owner.SelectionRange : new SelectionRange(); 559internal bool ShowToday => this.TryGetOwnerAs(out MonthCalendar? owner) && owner.ShowToday; 561internal bool ShowWeekNumbers => this.TryGetOwnerAs(out MonthCalendar? owner) && owner.ShowWeekNumbers; 563internal DateTime TodayDate => this.TryGetOwnerAs(out MonthCalendar? owner) ? owner.TodayDate : DateTime.Today; 578if (this.TryGetOwnerAs(out owner)) 588if (this.TryGetOwnerAs(out owner)) 595if (this.TryGetOwnerAs(out owner)) 623if (!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)
50internal override double Maximum => this.TryGetOwnerAs(out ProgressBar? owner) ? owner.Maximum : 0; 52internal override double Minimum => this.TryGetOwnerAs(out ProgressBar? owner) ? owner.Minimum : 0; 56internal override double RangeValue => this.TryGetOwnerAs(out ProgressBar? owner) ? owner.Value : 0;
System\Windows\Forms\Controls\PropertyGrid\PropertyGrid.PropertyGridAccessibleObject.cs (2)
104if (!this.TryGetOwnerAs(out PropertyGrid? owningPropertyGrid) || index < 0) 158if (!this.TryGetOwnerAs(out PropertyGrid? owningPropertyGrid))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\CategoryGridEntry.CategoryGridEntryAccessibleObject.cs (3)
33if (!this.TryGetOwnerAs(out CategoryGridEntry? owner) 39if (!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) 37if (!this.TryGetOwnerAs(out GridEntry? owner) || !owner.Expandable) 52internal 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 64public override string? Help => this.TryGetOwnerAs(out GridEntry? owner) ? owner.PropertyDescription : string.Empty; 68public override string? Name => this.TryGetOwnerAs(out GridEntry? owner) ? owner.PropertyLabel : null; 73this.TryGetOwnerAs(out GridEntry? owner) ? owner.OwnerGridView?.AccessibilityObject : null; 83if (PropertyGridView is null || !PropertyGridView.IsHandleCreated || !this.TryGetOwnerAs(out GridEntry? owner)) 143get => this.TryGetOwnerAs(out GridEntry? owner) ? owner.GetPropertyTextValue() : null; 146if (this.TryGetOwnerAs(out GridEntry? owner)) 169|| !this.TryGetOwnerAs(out GridEntry? owner)) 174if (!parent.TryGetOwnerAs(out PropertyGridView? gridView)) 209this.TryGetOwnerAs(out GridEntry? owner) 222propertyGridViewAccessibleObject.TryGetOwnerAs(out PropertyGridView? owner); 235if (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)) 283if (PropertyGridView is null || !PropertyGridView.IsHandleCreated || !this.TryGetOwnerAs(out GridEntry? owner)) 310if (this.TryGetOwnerAs(out GridEntry? owner) && owner.Expandable && owner.Expanded) 318if (this.TryGetOwnerAs(out GridEntry? owner) && owner.Expandable && !owner.Expanded) 329if (this.TryGetOwnerAs(out GridEntry? owner) && owner.ParentGridEntry is { } parentGridEntry) 356UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.TryGetOwnerAs(out GridEntry? owner) && owner.HasFocus), 363internal override bool IsIAccessibleExSupported() => this.TryGetOwnerAs(out GridEntry? owner) && owner.Expandable; 375if (this.TryGetOwnerAs(out GridEntry? owner) && owner.Expandable) 386if (!this.TryGetOwnerAs(out GridEntry? owner) || owner.OwnerGrid is null || owner.OwnerGrid.SortedByCategories)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\HelpPane.HelpPaneAccessibleObject.cs (1)
54if (this.TryGetOwnerAs(out Control? owner))
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyDescriptorGridEntry.PropertyDescriptorGridEntryAccessibleObject.cs (12)
19&& this.TryGetOwnerAs(out PropertyDescriptorGridEntry? owner) 29if (!this.TryGetOwnerAs(out PropertyDescriptorGridEntry? owner)) 100if (!this.TryGetOwnerAs(out PropertyDescriptorGridEntry? owner)) 165if (!this.TryGetOwnerAs(out PropertyDescriptorGridEntry? owner)) 263=> (VARIANT)(this.TryGetOwnerAs(out PropertyDescriptorGridEntry? owner) && !owner.IsPropertyReadOnly), 276this.TryGetOwnerAs(out PropertyDescriptorGridEntry? owner) 285|| !this.TryGetOwnerAs(out PropertyDescriptorGridEntry? owner)) 308if (!this.TryGetOwnerAs(out PropertyDescriptorGridEntry? owner)) 319&& propertyGridViewAccessibleObject.TryGetOwnerAs(out PropertyGridView? gridViewOwner) 329if (!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)
30if (!this.TryGetOwnerAs(out GridViewListBox? owner) 55this.TryGetOwnerAs(out GridViewListBox? owner)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.GridViewTextBox.GridViewTextBoxAccessibleObject.cs (6)
42if (!this.TryGetOwnerAs(out GridViewTextBox? owner) 62this.TryGetOwnerAs(out GridViewTextBox? owner) 68UIA_PROPERTY_ID.UIA_ClassNamePropertyId when this.TryGetOwnerAs(out object? owner) => (VARIANT)owner.GetType().ToString(), 70UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.TryGetOwnerAs(out Control? owner) && owner.Focused), 91if (!this.TryGetOwnerAs(out GridViewTextBox? owner)) 107=> !this.TryGetOwnerAs(out GridViewTextBox? owner)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.PropertyGridViewAccessibleObject.cs (16)
57this.TryGetOwnerAs(out PropertyGridView? owner) 79=> this.TryGetOwnerAs(out PropertyGridView? owner) && owner.OwnerGrid is { } ownerGrid && ownerGrid.SortedByCategories; 85if (!this.TryGetOwnerAs(out PropertyGridView? owner)) 104if (!this.TryGetOwnerAs(out PropertyGridView? owner)) 116if (!this.TryGetOwnerAs(out PropertyGridView? owner)) 135=> !this.TryGetOwnerAs(out PropertyGridView? owner) ? null : GetCategory(owner.TopLevelGridEntries!.Count - 1); 255if (current.ChildCount <= 0 || !this.TryGetOwnerAs(out PropertyGridView? _)) 286if (current.ChildCount <= 0 || !this.TryGetOwnerAs(out PropertyGridView? _)) 317if (!this.TryGetOwnerAs(out PropertyGridView? owner)) 341if (!this.TryGetOwnerAs(out PropertyGridView? owner)) 358if (!this.TryGetOwnerAs(out PropertyGridView? owner)) 382if (!this.TryGetOwnerAs(out PropertyGridView? owner)) 401this.TryGetOwnerAs(out PropertyGridView? owner) && owner.AccessibilityGetGridEntries() is { } entries 407if (!this.TryGetOwnerAs(out PropertyGridView? owner)) 422=> !this.TryGetOwnerAs(out PropertyGridView? owner) ? null : owner.SelectedGridEntry?.AccessibilityObject; 475if (!this.TryGetOwnerAs(out PropertyGridView? owner)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridToolStrip.PropertyGridToolStripAccessibleObject.cs (2)
55if (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)
131UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.TryGetOwnerAs(out TabControl? owner) && owner.Focused),
System\Windows\Forms\Controls\TabControl\TabPage.TabPageAccessibleObject.cs (3)
24this.TryGetOwnerAs(out TabPage? owningTabPage) ? owningTabPage.ParentInternal as TabControl : null; 67UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.TryGetOwnerAs(out TabPage? owningTabPage) && owningTabPage.Focused), 84if (!this.TryGetOwnerAs(out TabPage? owningTabPage) || OwningTabControl is null || owningTabPage != OwningTabControl.SelectedTab)
System\Windows\Forms\Controls\TextBox\MaskedTextBox.MaskedTextBoxAccessibleObject.cs (2)
16get => !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)
21string? placeholderText = this.TryGetOwnerAs(out TextBox? owner) ? owner.PlaceholderText : null;
System\Windows\Forms\Controls\TextBox\TextBoxBase.TextBoxBaseAccessibleObject.cs (6)
30if (this.TryGetOwnerAs(out TextBoxBase? owner)) 57internal override bool IsReadOnly => this.TryGetOwnerAs(out TextBoxBase? owner) && owner.ReadOnly; 70public 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; 89if (this.TryGetOwnerAs(out Control? owner)) 121public override string? KeyboardShortcut => this.TryGetOwnerAs(out TextBoxBase? owner)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.ToolStripAccessibleObject.cs (7)
43if (!this.TryGetOwnerAs(out ToolStrip? owner) || owner.Items is null) 123if (!this.TryGetOwnerAs(out ToolStrip? owner) || owner.Items is null) 152if (!this.TryGetOwnerAs(out ToolStrip? owner) || fragmentIndex < 0) 261if (!this.TryGetOwnerAs(out ToolStrip? owner) || owner.OverflowItems is null) 271if (!this.TryGetOwnerAs(out ToolStrip? owner) || owner.DisplayedItems is null) 281if (!this.TryGetOwnerAs(out ToolStrip? owner) || owner.Items is null) 326if (!this.TryGetOwnerAs(out ToolStrip? owner) || owner.Items is null)
System\Windows\Forms\Controls\ToolStrips\ToolStripComboBox.ToolStripComboBoxControl.ToolStripComboBoxControlAccessibleObject.cs (2)
26if (this.TryGetOwnerAs(out ToolStripComboBoxControl? owner)) 38this.TryGetOwnerAs(out ToolStripComboBoxControl? owner)
System\Windows\Forms\Controls\ToolStrips\ToolStripContainer.ToolStripContainerAccessibleObject.cs (1)
20UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.TryGetOwnerAs(out ToolStripContainer? owner) && owner.Focused),
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDown.ToolStripDropDownAccessibleObject.cs (4)
31return this.TryGetOwnerAs(out ToolStripDropDown? owner) 39if (this.TryGetOwnerAs(out ToolStripDropDown? owner)) 48&& this.TryGetOwnerAs(out ToolStripDropDown? owner) 54this.TryGetOwnerAs(out ToolStripDropDown? owner);
System\Windows\Forms\Controls\ToolStrips\ToolStripDropDownMenu.ToolStripDropDownMenuAccessibleObject.cs (2)
19NavigateDirection.NavigateDirection_Parent when this.TryGetOwnerAs(out ToolStripDropDownMenu? owner) 28UIA_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) 31NavigateDirection.NavigateDirection_Parent when this.TryGetOwnerAs(out ToolStripOverflow? owner)
System\Windows\Forms\Controls\ToolStrips\ToolStripPanel.ToolStripPanelAccessibleObject.cs (1)
21UIA_PROPERTY_ID.UIA_IsKeyboardFocusablePropertyId => (VARIANT)(this.TryGetOwnerAs(out ToolStripPanel? owner) && owner.CanFocus),
System\Windows\Forms\Controls\ToolStrips\ToolStripTextBox.ToolStripTextBoxControlAccessibleObject.cs (1)
25UIA_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)
37public 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); 155UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.TryGetOwnerAs(out TrackBar? owner) && owner.Focused),
System\Windows\Forms\Controls\TrackBar\TrackBar.TrackBarChildAccessibleObject.cs (4)
50internal virtual bool IsDisplayed => this.TryGetOwnerAs(out TrackBar? trackbar) && trackbar.Visible; 54internal TrackBarAccessibleObject? ParentInternal => this.TryGetOwnerAs(out TrackBar? owner) 61(int)(this.TryGetOwnerAs(out TrackBar? owner) ? owner.InternalHandle : HWND.Null), 77UIA_PROPERTY_ID.UIA_IsEnabledPropertyId => (VARIANT)(this.TryGetOwnerAs(out TrackBar? owner) && owner.Enabled),
System\Windows\Forms\Controls\TrackBar\TrackBar.TrackBarFirstButtonAccessibleObject.cs (2)
21public override string? Name => !this.TryGetOwnerAs(out TrackBar? owner) || ParentInternal is not { } parent 33if (!this.TryGetOwnerAs(out TrackBar? owner)
System\Windows\Forms\Controls\TrackBar\TrackBar.TrackBarLastButtonAccessibleObject.cs (1)
21public 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) 41this.TryGetOwnerAs(out TreeView? owningTreeView) ? owningTreeView.Nodes.Count : base.GetChildCount(); 50UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.TryGetOwnerAs(out TreeView? owningTreeView) 52UIA_PROPERTY_ID.UIA_IsEnabledPropertyId => (VARIANT)(this.TryGetOwnerAs(out TreeView? owningTreeView) && owningTreeView.Enabled), 81if (!this.TryGetOwnerAs(out TreeView? owningTreeView)) 110internal override bool IsSelectionRequired => this.TryGetOwnerAs(out TreeView? owningTreeView) &&
System\Windows\Forms\Controls\UpDown\UpDownBase.UpDownBaseAccessibleObject.cs (1)
15if (!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)
19UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.TryGetOwnerAs(out WebBrowser? owner) && owner.Focused),
System\Windows\Forms\Form.AccessibleObject.cs (1)
39UIA_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)
20UIA_PROPERTY_ID.UIA_AutomationIdPropertyId when this.TryGetOwnerAs(out SplitContainer? owner) => (VARIANT)owner.Name, 21UIA_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 30if (!this.TryGetOwnerAs(out PrintPreviewControl? owner)) 42if (!this.TryGetOwnerAs(out PrintPreviewControl? owner)) 63UIA_PATTERN_ID.UIA_ScrollPatternId => this.TryGetOwnerAs(out PrintPreviewControl? owner) 72if (!this.TryGetOwnerAs(out PrintPreviewControl? owner)) 97if (!this.TryGetOwnerAs(out PrintPreviewControl? owner)) 154if (!this.TryGetOwnerAs(out PrintPreviewControl? owner)) 179if (this.TryGetOwnerAs(out PrintPreviewControl? owner) && owner._hScrollBar.Visible) 193if (this.TryGetOwnerAs(out PrintPreviewControl? owner) && owner._vScrollBar.Visible) 203public double HorizontalViewSize => this.TryGetOwnerAs(out PrintPreviewControl? owner) 206public double VerticalViewSize => this.TryGetOwnerAs(out PrintPreviewControl? owner) 210this.TryGetOwnerAs(out PrintPreviewControl? owner) && owner._hScrollBar.Visible; 213this.TryGetOwnerAs(out PrintPreviewControl? owner) && owner._vScrollBar.Visible;
System\Windows\Forms\Printing\PrintPreviewControl.ScrollBarAccessibleObject.cs (2)
17this.TryGetOwnerAs(out ScrollBar? scrollBar) && scrollBar.Parent is PrintPreviewControl printPreviewControl 25if (!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; 44internal int UIMaximum => this.TryGetOwnerAs(out ScrollBar? owner) ? owner.Maximum - owner.LargeChange + 1 : 0; 146UIA_PROPERTY_ID.UIA_HasKeyboardFocusPropertyId => (VARIANT)(this.TryGetOwnerAs(out ScrollBar? owner) && owner.Focused), 159internal override double RangeValue => this.TryGetOwnerAs(out ScrollBar? owner) ? owner.Value : base.RangeValue; 161internal override double LargeChange => this.TryGetOwnerAs(out ScrollBar? owner) ? owner.LargeChange : base.LargeChange; 163internal override double SmallChange => this.TryGetOwnerAs(out ScrollBar? owner) ? owner.SmallChange : base.SmallChange; 165internal override double Maximum => this.TryGetOwnerAs(out ScrollBar? owner) ? owner.Maximum : base.Maximum; 167internal override double Minimum => this.TryGetOwnerAs(out ScrollBar? owner) ? owner.Minimum : base.Minimum;