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