23 references to Selected
System.Windows.Forms (7)
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (2)
594if (SelectionMode != SelectionMode.None && (e.State & DrawItemState.Selected) == DrawItemState.Selected)
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.cs (1)
2307e.State.HasFlag(DrawItemState.Selected) ? GridEntry.PaintValueFlags.DrawSelected : default,
System\Windows\Forms\Rendering\DrawItemEventArgs.cs (4)
115=> (State & DrawItemState.Selected) == DrawItemState.Selected ? SystemColors.HighlightText : _foreColor; 118=> (State & DrawItemState.Selected) == DrawItemState.Selected ? SystemColors.Highlight : _backColor;
System.Windows.Forms.Design (4)
System\ComponentModel\Design\CollectionEditor.CollectionEditorCollectionForm.cs (2)
581if ((e.State & DrawItemState.Selected) == DrawItemState.Selected)
System\Windows\Forms\Design\DataGridViewColumnCollectionDialog.cs (2)
1001if ((e.State & DrawItemState.Selected) == DrawItemState.Selected)
System.Windows.Forms.Tests (12)
System\Windows\Forms\DrawItemEventArgsTests.cs (12)
15yield return new object[] { SystemFonts.DefaultFont, new Rectangle(-1, 2, -3, -4), 0, DrawItemState.Selected, SystemColors.HighlightText, SystemColors.Highlight }; 40yield return new object[] { SystemFonts.DefaultFont, new Rectangle(-1, 2, -3, -4), 0, DrawItemState.Selected, Color.Red, Color.Blue }; 58Assert.Equal((state & DrawItemState.Selected) == DrawItemState.Selected ? SystemColors.HighlightText : foreColor, e.ForeColor); 59Assert.Equal((state & DrawItemState.Selected) == DrawItemState.Selected ? SystemColors.Highlight : backColor, e.BackColor); 72yield return new object[] { new Rectangle(1, 2, 3, 4), DrawItemState.Selected }; 74yield return new object[] { new Rectangle(1, 2, 3, 4), DrawItemState.Focus | DrawItemState.Selected }; 76yield return new object[] { new Rectangle(1, 2, 3, 4), DrawItemState.Focus | DrawItemState.NoFocusRect | DrawItemState.Selected }; 78yield return new object[] { new Rectangle(-1, -2, -3, -4), DrawItemState.Selected }; 80yield return new object[] { new Rectangle(-1, -2, -3, -4), DrawItemState.Focus | DrawItemState.Selected }; 82yield return new object[] { new Rectangle(-1, -2, -3, -4), DrawItemState.Focus | DrawItemState.NoFocusRect | DrawItemState.Selected };