96 references to ListViewItemStates
System.Windows.Forms (13)
System\Windows\Forms\Controls\ListView\DrawListViewColumnHeaderEventArgs.cs (2)
23
ListViewItemStates
state,
61
public
ListViewItemStates
State { get; }
System\Windows\Forms\Controls\ListView\DrawListViewItemEventArgs.cs (4)
21
ListViewItemStates
state)
53
public
ListViewItemStates
State { get; }
75
if ((State &
ListViewItemStates
.Focused) ==
ListViewItemStates
.Focused)
System\Windows\Forms\Controls\ListView\DrawListViewSubItemEventArgs.cs (4)
24
ListViewItemStates
itemState)
84
public
ListViewItemStates
ItemState { get; }
111
if ((ItemState &
ListViewItemStates
.Focused) ==
ListViewItemStates
.Focused)
System\Windows\Forms\Controls\ListView\ListView.cs (3)
2644
(
ListViewItemStates
)nmcd->nmcd.uItemState);
2736
(
ListViewItemStates
)nmcd->nmcd.uItemState);
6003
(
ListViewItemStates
)nmcd->uItemState,
System.Windows.Forms.Tests (83)
System\Windows\Forms\DrawListViewColumnHeaderEventArgsTests.cs (16)
13
yield return new object[] { Rectangle.Empty, -2, null, (DrawItemState)(
ListViewItemStates
.Checked - 1), Color.Empty, Color.Empty, null };
14
yield return new object[] { new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(),
ListViewItemStates
.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont };
15
yield return new object[] { new Rectangle(-1, 2, -3, -4), 0, new ColumnHeader(),
ListViewItemStates
.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont };
16
yield return new object[] { new Rectangle(1, 2, 3, 4), 1, new ColumnHeader(),
ListViewItemStates
.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont };
21
public void DrawListViewColumnHeaderEventArgs_Ctor_Graphics_Rectangle_Int_ColumnHeader_ListViewItemStates_Color_Color_Font(Rectangle bounds, int columnIndex, ColumnHeader header,
ListViewItemStates
state, Color foreColor, Color backColor, Font font)
40
Assert.Throws<ArgumentNullException>("graphics", () => new DrawListViewColumnHeaderEventArgs(null, new Rectangle(1, 2, 3, 4), 0, new ColumnHeader(),
ListViewItemStates
.Default, Color.Red, Color.Blue, SystemFonts.DefaultFont));
49
DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(),
ListViewItemStates
.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont)
66
yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(),
ListViewItemStates
.Default, Color.Red, Color.Blue, SystemFonts.DefaultFont };
67
yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(),
ListViewItemStates
.Default, Color.Red, Color.Blue, SystemFonts.DefaultFont };
68
yield return new object[] { new Rectangle(1, 2, 3, 4), new ColumnHeader(),
ListViewItemStates
.Default, Color.Red, Color.Blue, SystemFonts.DefaultFont };
73
public void DrawListViewColumnHeaderEventArgs_DrawBackground_Invoke_Success(Rectangle bounds, ColumnHeader header,
ListViewItemStates
state, Color foreColor, Color backColor, Font font)
90
DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, header,
ListViewItemStates
.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont);
99
DrawListViewColumnHeaderEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), -1, new ColumnHeader(),
ListViewItemStates
.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont);
105
yield return new object[] { new Rectangle(-1, -2, -3, -4), 0,
ListViewItemStates
.Default, Color.Empty, Color.Empty, null };
106
yield return new object[] { new Rectangle(1, 2, 3, 4), -1,
ListViewItemStates
.Checked, Color.Red, Color.Blue, SystemFonts.DefaultFont };
111
public void DrawListViewColumnHeaderEventArgs_DrawText_NullHeader_Success(Rectangle bounds, int columnIndex,
ListViewItemStates
state, Color foreColor, Color backColor, Font font)
System\Windows\Forms\DrawListViewItemEventArgsTests.cs (30)
13
yield return new object[] { Rectangle.Empty, -2,
ListViewItemStates
.Checked - 1 };
14
yield return new object[] { new Rectangle(1, 2, 3, 4), -1,
ListViewItemStates
.Checked };
15
yield return new object[] { new Rectangle(-1, 2, -3, -4), 0,
ListViewItemStates
.Focused };
16
yield return new object[] { new Rectangle(1, 2, 3, 4), 1,
ListViewItemStates
.Checked };
21
public void DrawListViewItemEventArgs_Ctor_Graphics_ListViewItem_Rectangle_Int_ListViewItemStates(Rectangle bounds, int itemIndex,
ListViewItemStates
state)
38
Assert.Throws<ArgumentNullException>("graphics", () => new DrawListViewItemEventArgs(null, new ListViewItem(), new Rectangle(1, 2, 3, 4), 0,
ListViewItemStates
.Default));
46
Assert.Throws<ArgumentNullException>("item", () => new DrawListViewItemEventArgs(graphics, null, new Rectangle(1, 2, 3, 4), 0,
ListViewItemStates
.Default));
55
DrawListViewItemEventArgs e = new(graphics, new ListViewItem(), new Rectangle(1, 2, 3, 4), -1,
ListViewItemStates
.Checked)
72
yield return new object[] { new ListViewItem(), new Rectangle(1, 2, 3, 4),
ListViewItemStates
.Default };
73
yield return new object[] { new ListViewItem(), new Rectangle(1, 2, 3, 4),
ListViewItemStates
.Focused };
74
yield return new object[] { new ListViewItem(), new Rectangle(1, 2, 3, 4),
ListViewItemStates
.Checked };
75
yield return new object[] { new ListViewItem(), Rectangle.Empty,
ListViewItemStates
.Default };
76
yield return new object[] { new ListViewItem(), Rectangle.Empty,
ListViewItemStates
.Focused };
77
yield return new object[] { new ListViewItem(), Rectangle.Empty,
ListViewItemStates
.Checked };
78
yield return new object[] { new ListViewItem(), new Rectangle(-1, -2, -3, -4),
ListViewItemStates
.Default };
79
yield return new object[] { new ListViewItem(), new Rectangle(-1, -2, -3, -4),
ListViewItemStates
.Focused };
80
yield return new object[] { new ListViewItem(), new Rectangle(-1, -2, -3, -4),
ListViewItemStates
.Checked };
87
yield return new object[] { listViewItem, new Rectangle(1, 2, 3, 4),
ListViewItemStates
.Default };
88
yield return new object[] { listViewItem, new Rectangle(1, 2, 3, 4),
ListViewItemStates
.Focused };
89
yield return new object[] { listViewItem, new Rectangle(1, 2, 3, 4),
ListViewItemStates
.Checked };
94
yield return new object[] { subItemsItem, new Rectangle(1, 2, 3, 4),
ListViewItemStates
.Default };
95
yield return new object[] { subItemsItem, new Rectangle(1, 2, 3, 4),
ListViewItemStates
.Focused };
96
yield return new object[] { subItemsItem, new Rectangle(1, 2, 3, 4),
ListViewItemStates
.Checked };
102
yield return new object[] { fullRowSelectListViewItem, new Rectangle(1, 2, 3, 4),
ListViewItemStates
.Default };
103
yield return new object[] { fullRowSelectListViewItem, new Rectangle(1, 2, 3, 4),
ListViewItemStates
.Focused };
104
yield return new object[] { fullRowSelectListViewItem, new Rectangle(1, 2, 3, 4),
ListViewItemStates
.Checked };
110
public void DrawListViewItemEventArgs_DrawBackground_Invoke_Success(ListViewItem item, Rectangle bounds,
ListViewItemStates
state)
120
public void DrawListViewItemEventArgs_DrawFocusRectangle_HasGraphicsFocused_Success(ListViewItem item, Rectangle bounds,
ListViewItemStates
state)
130
public void DrawListViewItemEventArgs_DrawText_Invoke_Success(ListViewItem item, Rectangle bounds,
ListViewItemStates
state)
140
public void DrawListViewItemEventArgs_DrawText_InvokeTextFormatFlags(ListViewItem item, Rectangle bounds,
ListViewItemStates
state)
System\Windows\Forms\DrawListViewSubItemEventArgsTests.cs (37)
12
yield return new object[] { Rectangle.Empty, null, new ListViewItem.ListViewSubItem(), -2, -2, null,
ListViewItemStates
.Checked - 1 };
13
yield return new object[] { Rectangle.Empty, new ListViewItem(), new ListViewItem.ListViewSubItem(), -2, -2, null,
ListViewItemStates
.Checked - 1 };
14
yield return new object[] { new Rectangle(1, 2, 3, 4), new ListViewItem(), null, -1, -1, new ColumnHeader(),
ListViewItemStates
.Checked };
15
yield return new object[] { new Rectangle(1, 2, 3, 4), new ListViewItem(), new ListViewItem.ListViewSubItem(), -1, -1, new ColumnHeader(),
ListViewItemStates
.Checked };
16
yield return new object[] { new Rectangle(-1, 2, -3, -4), new ListViewItem(), new ListViewItem.ListViewSubItem(), 0, 0, new ColumnHeader(),
ListViewItemStates
.Focused };
17
yield return new object[] { new Rectangle(1, 2, 3, 4), new ListViewItem(), new ListViewItem.ListViewSubItem(), 1, 2, new ColumnHeader(),
ListViewItemStates
.Checked };
22
public void DrawListViewSubItemEventArgs_Ctor_Graphics_ListViewItem_Rectangle_Int_ListViewItemStates(Rectangle bounds, ListViewItem item, ListViewItem.ListViewSubItem subItem, int itemIndex, int columnIndex, ColumnHeader header,
ListViewItemStates
itemState)
41
Assert.Throws<ArgumentNullException>("graphics", () => new DrawListViewSubItemEventArgs(null, new Rectangle(1, 2, 3, 4), new ListViewItem(), new ListViewItem.ListViewSubItem(), -1, 0, new ColumnHeader(),
ListViewItemStates
.Default));
49
Assert.Throws<ArgumentNullException>("item", () => new DrawListViewSubItemEventArgs(graphics, new Rectangle(1, 2, 3, 4), null, new ListViewItem.ListViewSubItem(), -1, 0, new ColumnHeader(),
ListViewItemStates
.Default));
59
Assert.Throws<ArgumentNullException>("subItem", () => new DrawListViewSubItemEventArgs(graphics, new Rectangle(1, 2, 3, 4), new ListViewItem(), null, itemIndex, 0, new ColumnHeader(),
ListViewItemStates
.Default));
68
DrawListViewSubItemEventArgs e = new(graphics, new Rectangle(1, 2, 3, 4), new ListViewItem(), null, -1, -1, new ColumnHeader(),
ListViewItemStates
.Checked)
85
yield return new object[] { new Rectangle(-1, -2, -3, -4), new ListViewItem(), null, -1, null,
ListViewItemStates
.Default };
86
yield return new object[] { new Rectangle(-1, -2, -3, -4), new ListViewItem(), null, -1, null,
ListViewItemStates
.Checked };
87
yield return new object[] { new Rectangle(-1, -2, -3, -4), new ListViewItem(), null, -1, null,
ListViewItemStates
.Focused };
88
yield return new object[] { new Rectangle(-1, -2, -3, -4), new ListViewItem(), null, -1, new ColumnHeader(),
ListViewItemStates
.Default };
89
yield return new object[] { new Rectangle(-1, -2, -3, -4), new ListViewItem(), null, -1, new ColumnHeader(),
ListViewItemStates
.Checked };
90
yield return new object[] { new Rectangle(-1, -2, -3, -4), new ListViewItem(), null, -1, new ColumnHeader(),
ListViewItemStates
.Focused };
91
yield return new object[] { new Rectangle(1, 2, 3, 4), new ListViewItem(), null, -1, null,
ListViewItemStates
.Default };
92
yield return new object[] { new Rectangle(1, 2, 3, 4), new ListViewItem(), null, -1, null,
ListViewItemStates
.Checked };
93
yield return new object[] { new Rectangle(1, 2, 3, 4), new ListViewItem(), null, -1, null,
ListViewItemStates
.Focused };
94
yield return new object[] { new Rectangle(1, 2, 3, 4), new ListViewItem(), null, -1, new ColumnHeader(),
ListViewItemStates
.Default };
95
yield return new object[] { new Rectangle(1, 2, 3, 4), new ListViewItem(), null, -1, new ColumnHeader(),
ListViewItemStates
.Checked };
96
yield return new object[] { new Rectangle(1, 2, 3, 4), new ListViewItem(), null, -1, new ColumnHeader(),
ListViewItemStates
.Focused };
98
yield return new object[] { new Rectangle(-1, -2, -3, -4), null, new ListViewItem.ListViewSubItem(), 0, null,
ListViewItemStates
.Default };
99
yield return new object[] { new Rectangle(-1, -2, -3, -4), null, new ListViewItem.ListViewSubItem(), 0, null,
ListViewItemStates
.Checked };
100
yield return new object[] { new Rectangle(-1, -2, -3, -4), null, new ListViewItem.ListViewSubItem(), 0, null,
ListViewItemStates
.Focused };
101
yield return new object[] { new Rectangle(-1, -2, -3, -4), null, new ListViewItem.ListViewSubItem(), 0, new ColumnHeader(),
ListViewItemStates
.Default };
102
yield return new object[] { new Rectangle(-1, -2, -3, -4), null, new ListViewItem.ListViewSubItem(), 0, new ColumnHeader(),
ListViewItemStates
.Checked };
103
yield return new object[] { new Rectangle(-1, -2, -3, -4), null, new ListViewItem.ListViewSubItem(), 0, new ColumnHeader(),
ListViewItemStates
.Focused };
104
yield return new object[] { new Rectangle(1, 2, 3, 4), null, new ListViewItem.ListViewSubItem(), 0, null,
ListViewItemStates
.Default };
105
yield return new object[] { new Rectangle(1, 2, 3, 4), null, new ListViewItem.ListViewSubItem(), 0, null,
ListViewItemStates
.Checked };
106
yield return new object[] { new Rectangle(1, 2, 3, 4), null, new ListViewItem.ListViewSubItem(), 0, null,
ListViewItemStates
.Focused };
107
yield return new object[] { new Rectangle(1, 2, 3, 4), null, new ListViewItem.ListViewSubItem(), 0, new ColumnHeader(),
ListViewItemStates
.Default };
108
yield return new object[] { new Rectangle(1, 2, 3, 4), null, new ListViewItem.ListViewSubItem(), 0, new ColumnHeader(),
ListViewItemStates
.Checked };
109
yield return new object[] { new Rectangle(1, 2, 3, 4), null, new ListViewItem.ListViewSubItem(), 0, new ColumnHeader(),
ListViewItemStates
.Focused };
114
public void DrawListViewSubItemEventArgs_DrawBackground_HasGraphics_Success(Rectangle bounds, ListViewItem item, ListViewItem.ListViewSubItem subItem, int itemIndex, ColumnHeader header,
ListViewItemStates
itemState)
124
public void DrawListViewSubItemEventArgs_DrawFocusRectangle_HasGraphics_Success(Rectangle bounds, ListViewItem item, ListViewItem.ListViewSubItem subItem, int itemIndex, ColumnHeader header,
ListViewItemStates
itemState)