8 overrides of GetSelected
System.Windows.Forms (7)
System\Windows\Forms\Controls\DataGridView\DataGridView.AccessibleObject.cs (1)
151public override AccessibleObject GetSelected() => SelectedCellsAccessibilityObject;
System\Windows\Forms\Controls\DataGridView\DataGridView.SelectedCellsAccessibleObject.cs (1)
45public override AccessibleObject GetSelected() => this;
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.DataGridViewCellAccessibleObject.cs (1)
434public override AccessibleObject? GetSelected() => null;
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.DataGridViewRowAccessibleObject.cs (1)
304public override AccessibleObject GetSelected() => SelectedCellsAccessibilityObject;
System\Windows\Forms\Controls\DataGridView\DataGridViewRow.DataGridViewSelectedRowCellsAccessibleObject.cs (1)
82public override AccessibleObject GetSelected() => this;
System\Windows\Forms\Controls\ListBoxes\ListBox.AccessibleObject.cs (1)
233public override AccessibleObject? GetSelected()
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.PropertyGridViewAccessibleObject.cs (1)
420public override AccessibleObject? GetSelected()
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\ControlDesigner.ControlDesignerAccessibleObject.cs (1)
99public override AccessibleObject? GetSelected()
26 references to GetSelected
System.Windows.Forms (4)
System\Windows\Forms\Accessibility\AccessibleObject.cs (2)
1279if (GetSelected() is not IRawElementProviderSimple.Interface selected) 2338AccessibleObject? obj = GetSelected();
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (1)
1874if (focused == AccessibilityObject.GetSelected())
System\Windows\Forms\Controls\TreeView\TreeView.TreeViewAccessibleObject.cs (1)
114=> this.IsOwnerHandleCreated(out TreeView? _) && GetSelected() is IRawElementProviderSimple.Interface selected
System.Windows.Forms.Tests (22)
System\Windows\Forms\AccessibleObjects\AccessibleObjectTests.cs (13)
200Assert.Null(accessibleObject.GetSelected()); 214.Setup(a => a.GetSelected()) 216Assert.Null(mockAccessibleObject.Object.GetSelected()); 230.Setup(a => a.GetSelected()) 232Assert.Same(mockAccessibleObject.Object, mockAccessibleObject.Object.GetSelected()); 254.Setup(a => a.GetSelected()) 256Assert.Null(mockAccessibleObject.Object.GetSelected()); 291.Setup(a => a.GetSelected()) 293Assert.Same(mockAccessibleObjectChild1.Object, mockAccessibleObject.Object.GetSelected()); 1389.Setup(a => a.GetSelected()) 1394mockAccessibleObject.Verify(a => a.GetSelected(), Times.Once()); 1402.Setup(a => a.GetSelected()) 1407mockAccessibleObject.Verify(a => a.GetSelected(), Times.Once());
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (1)
982Assert.Null(accessibleObject.GetSelected());
System\Windows\Forms\AccessibleObjects\DataGridViewRowAccessibleObjectTests.cs (1)
325Assert.Throws<InvalidOperationException>(accessibleObject.GetSelected);
System\Windows\Forms\AccessibleObjects\DataGridViewSelectedCellsAccessibleObjectTests.cs (1)
71Assert.Equal(accessibleObject, accessibleObject.GetSelected());
System\Windows\Forms\AccessibleObjects\DataGridViewSelectedRowCellsAccessibleObjectTests.cs (1)
74Assert.Equal(accessibleObject, accessibleObject.GetSelected());
System\Windows\Forms\AccessibleObjects\ListBoxAccessibleObjectTests.cs (5)
260accessibleObject.GetSelected().Should().BeNull(); 263accessibleObject.GetSelected().Should().Be(accessibleObject.GetChild(0)); 266accessibleObject.GetSelected().Should().Be(accessibleObject.GetChild(1)); 269accessibleObject.GetSelected().Should().BeNull(); 331var selectedObject = accessibleObject.GetSelected();