Base:
property
Current
System.Windows.Forms.BindingManagerBase.Current
27 references to Current
System.Windows.Forms (10)
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (4)
1293currentItem = CurrencyManager.Current; 1306editableObject = CurrencyManager.Current as IEditableObject; 1370if (CurrencyManager.Current is IEditableObject iEditObj) 1450if (CurrencyManager!.Current is IEditableObject iEditObj)
System\Windows\Forms\DataBinding\BindingSource.cs (4)
189public object? Current => _currencyManager.Count > 0 ? _currencyManager.Current : null; 908currentValue = ListBindingHelper.GetList(dmProp.GetValue(cm.Current)); 940currentItemChanged = ((_lastCurrentItem is null) || (cm.Count == 0) || (_lastCurrentItem != cm.Current) || (Position >= Count)); 943_lastCurrentItem = cm.Count > 0 ? cm.Current : null;
System\Windows\Forms\DataBinding\ListBindingHelper.cs (1)
58currentItem = currentKnown ? cm!.Current : null;
System\Windows\Forms\DataBinding\RelatedCurrencyManager.cs (1)
163SetDataSource(_fieldInfo.GetValue(currencyManager.Current));
System.Windows.Forms.Tests (17)
System\Windows\Forms\BindingContextTests.cs (10)
421Assert.Equal(1, manager.Current); 435Assert.Equal(1, manager.Current); 454Assert.Equal(1, manager.Current); 581Assert.Equal(1, manager.Current); 618Assert.Equal(1, manager.Current); 640Assert.Equal(1, manager.Current); 825Assert.Equal(1, manager.Current); 863Assert.Equal(1, manager.Current); 920Assert.Equal(1, manager1.Current); 927Assert.Equal(1, manager2.Current);
System\Windows\Forms\BindingSourceTests.cs (7)
25Assert.Throws<IndexOutOfRangeException>(() => source.CurrencyManager.Current); 84Assert.Throws<IndexOutOfRangeException>(() => source.CurrencyManager.Current); 149Assert.Throws<IndexOutOfRangeException>(() => source.CurrencyManager.Current); 235Assert.Equal(expected[0], source.CurrencyManager.Current); 305Assert.Equal(expected[0], source.CurrencyManager.Current); 414Assert.Throws<IndexOutOfRangeException>(() => source.CurrencyManager.Current); 488Assert.Throws<IndexOutOfRangeException>(() => source.CurrencyManager.Current);