Base:
property
Count
System.Windows.Forms.BindingManagerBase.Count
46 references to Count
System.Windows.Forms (29)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (2)
2986
if (DataManager is not null && DataManager.
Count
!= -1)
2988
newItems = new object[DataManager.
Count
];
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (5)
362
_lastListCount = CurrencyManager!.
Count
;
442
while (DataBoundRowsCount() < CurrencyManager!.
Count
);
721
CurrencyManager.
Count
== DataBoundRowsCount() + 1) // condition 6.
747
clearSelection |= _lastListCount == -1 || _lastListCount == CurrencyManager!.
Count
;
1107
_lastListCount = CurrencyManager.
Count
;
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
3356
if ((DataConnection.CurrencyManager?.
Count
?? 0) <= _ptCurrentCell.Y)
System\Windows\Forms\Controls\DataGridView\DataGridViewCell.cs (2)
2441
else if ((dataConnection.CurrencyManager?.
Count
?? 0) <= rowIndex)
3889
else if ((dataConnection.CurrencyManager?.
Count
?? 0) <= rowIndex)
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (2)
1099
if (dataManager is not null && dataManager.
Count
!= -1)
1101
object[] newItems = new object[dataManager.
Count
];
System\Windows\Forms\Controls\ListBoxes\ListBox.cs (2)
1986
if (DataManager is not null && DataManager.
Count
!= -1)
1988
newItems = new object[DataManager.
Count
];
System\Windows\Forms\DataBinding\BindingSource.cs (4)
189
public object? Current => _currencyManager.
Count
> 0 ? _currencyManager.Current : null;
901
if (cm.
Count
> 0)
940
currentItemChanged = ((_lastCurrentItem is null) || (cm.
Count
== 0) || (_lastCurrentItem != cm.Current) || (Position >= Count));
943
_lastCurrentItem = cm.
Count
> 0 ? cm.Current : null;
System\Windows\Forms\DataBinding\CurrencyManager.cs (7)
299
if (
Count
> 0)
339
if ((newPosition < 0 || newPosition >=
Count
) && IsBinding)
372
listposition = Math.Min(newPosition,
Count
- 1);
468
if (
Count
> 0)
742
ChangeRecordState(Math.Min(listposition,
Count
- 1), true, false, true, false);
843
if (
Count
> 0)
891
if ((e.Index == listposition || (e.Index == -1 && Position <
Count
)) && !_state.HasFlag(CurrencyManagerStates.InChangeRecordState))
System\Windows\Forms\DataBinding\ListBindingHelper.cs (1)
57
bool currentKnown = (cm is not null && cm.Position >= 0 && cm.Position <= cm.
Count
- 1);
System\Windows\Forms\DataBinding\RelatedCurrencyManager.cs (3)
160
if (currencyManager.
Count
> 0)
164
listposition = (
Count
> 0 ? 0 : -1);
199
listposition = (
Count
> 0 ? 0 : -1);
System.Windows.Forms.Tests (17)
System\Windows\Forms\BindingContextTests.cs (10)
422
Assert.Equal(3, manager.
Count
);
436
Assert.Equal(3, manager.
Count
);
455
Assert.Equal(3, manager.
Count
);
582
Assert.Equal(3, manager.
Count
);
619
Assert.Equal(3, manager.
Count
);
641
Assert.Equal(3, manager.
Count
);
825
Assert.Equal(3, manager.
Count
);
863
Assert.Equal(3, manager.
Count
);
920
Assert.Equal(3, manager1.
Count
);
927
Assert.Equal(3, manager2.
Count
);
System\Windows\Forms\BindingSourceTests.cs (7)
22
Assert.Equal(0, source.CurrencyManager.
Count
);
81
Assert.Equal(0, source.CurrencyManager.
Count
);
146
Assert.Equal(expected.Count, source.CurrencyManager.
Count
);
232
Assert.Equal(expected.Count, source.CurrencyManager.
Count
);
302
Assert.Equal(expected.Count, source.CurrencyManager.
Count
);
411
Assert.Equal(0, source.CurrencyManager.
Count
);
485
Assert.Equal(0, source.CurrencyManager.
Count
);