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