43 references to GetItemText
System.Windows.Forms (26)
System\Windows\Forms\Controls\ComboBox\ComboBox.ComboBoxItemAccessibleObject.cs (1)
141
public override string? Name => _owningComboBox is null ? base.Name : _owningComboBox.
GetItemText
(_owningItem.Item);
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (6)
847
strings[i] =
GetItemText
(Items[i])!;
1086
string? candidate =
GetItemText
(SelectedItem);
1121
|| string.Compare(value,
GetItemText
(selectedItem), ignoreCase: false, CultureInfo.CurrentCulture) != 0))
2158
int insertIndex = (int)PInvokeCore.SendMessage(this, PInvoke.CB_ADDSTRING, (WPARAM)0,
GetItemText
(item));
2209
int insertIndex = (int)PInvokeCore.SendMessage(this, PInvoke.CB_INSERTSTRING, (WPARAM)index,
GetItemText
(item));
3432
s =
GetItemText
(item);
System\Windows\Forms\Controls\ComboBox\ComboBox.ObjectCollection.cs (3)
421
if (string.Compare(_owner.
GetItemText
(value), _owner.NativeGetItemText(index), true, CultureInfo.CurrentCulture) != 0)
471
string? itemName1 = _owner.
GetItemText
(entry1.Item);
472
string? itemName2 = _owner.
GetItemText
(entry2.Item);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (1)
606
Size preferredSize = TextRenderer.MeasureText(comboBox.
GetItemText
(item), comboBox.Font);
System\Windows\Forms\Controls\ListBoxes\CheckedListBox.cs (1)
592
string? text =
GetItemText
(item);
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (8)
1066
return
GetItemText
(SelectedItem) ?? string.Empty;
1084
if (SelectionMode != SelectionMode.None && value is not null && (SelectedItem is null || !value.Equals(
GetItemText
(SelectedItem))))
1089
if (string.Compare(value,
GetItemText
(Items[index]), true, CultureInfo.CurrentCulture) == 0)
1304
strings[i] =
GetItemText
(Items[i]);
1534
int insertIndex = (int)PInvokeCore.SendMessage(this, PInvoke.LB_ADDSTRING, 0,
GetItemText
(item));
1589
int insertIndex = (int)PInvokeCore.SendMessage(this, PInvoke.LB_INSERTSTRING, (uint)index,
GetItemText
(item));
2216
string? z =
GetItemText
(Items[0]);
2282
width = (int)(Math.Ceiling(graphics.MeasureString(
GetItemText
(item), Font).Width));
System\Windows\Forms\Controls\ListBoxes\ListBox.ItemAccessibleObject.cs (1)
92
public override string? Name => _owningListBox.
GetItemText
(_itemEntry.Item);
System\Windows\Forms\Controls\ListBoxes\ListBox.ObjectCollection.cs (1)
424
if (string.Compare(_owner.
GetItemText
(value), _owner.NativeGetItemText(index), true, CultureInfo.CurrentCulture) != 0)
System\Windows\Forms\Controls\ListControl\ListControl.cs (2)
498
found = string.Compare(str,
GetItemText
(items[index]), ignoreCase, CultureInfo.CurrentCulture) == 0;
502
found = string.Compare(str, 0,
GetItemText
(items[index]), 0, str.Length, ignoreCase, CultureInfo.CurrentCulture) == 0;
System\Windows\Forms\Internal\ItemArray.cs (2)
306
string? itemName1 = _listControl.
GetItemText
(entry1.Item);
307
string? itemName2 = _listControl.
GetItemText
(entry2.Item);
System.Windows.Forms.Tests (17)
System\Windows\Forms\ListBoxTests.cs (1)
6278
string result = listBox.
GetItemText
(listBox.SelectedItem);
System\Windows\Forms\ListControlTests.cs (16)
2380
Assert.Equal(expected, control.
GetItemText
(item));
2383
Assert.Equal(expected, control.
GetItemText
(item));
2419
Assert.Equal(expected, control.
GetItemText
(item));
2424
Assert.Equal("3", control.
GetItemText
(item));
2461
Assert.Equal("3", control.
GetItemText
(item));
2466
Assert.Equal("3", control.
GetItemText
(item));
2481
Assert.Equal("custom", control.
GetItemText
(item));
2484
Assert.Equal("custom", control.
GetItemText
(item));
2498
Assert.Equal("10", control.
GetItemText
(item));
2501
Assert.Equal("10", control.
GetItemText
(item));
2514
Assert.Equal("10", control.
GetItemText
(item));
2517
Assert.Equal("10", control.
GetItemText
(item));
2531
Assert.Equal("NonCriticalThrowingTypeConverterDataClassToString", control.
GetItemText
(item));
2534
Assert.Equal("NonCriticalThrowingTypeConverterDataClassToString", control.
GetItemText
(item));
2548
Assert.Throws<StackOverflowException>(() => control.
GetItemText
(item));
2551
Assert.Throws<StackOverflowException>(() => control.
GetItemText
(item));