47 references to
System.Windows.Forms (5)
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (1)
1079CurrencyManager = _owner.BindingContext[DataSource, DataMember] as CurrencyManager;
System\Windows\Forms\Controls\ListControl\ListControl.cs (1)
709newDataManager = (CurrencyManager)BindingContext[newDataSource, newDisplayMember.BindingPath];
System\Windows\Forms\DataBinding\BindingContext.cs (1)
77public BindingManagerBase this[object dataSource] => this[dataSource, string.Empty];
System\Windows\Forms\ErrorProvider\ErrorProvider.cs (2)
274_errorManager = _parentControl.BindingContext[_dataSource, _dataMember]; 315_errorManager = _parentControl.BindingContext[value, _dataMember];
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\DataGridViewComboBoxColumnDesigner.cs (1)
87bindingManagerBase = s_bindingContext[dataSource, bindingMemberInfo.BindingPath];
System.Windows.Forms.Tests (41)
System\Windows\Forms\BindingContextTests.cs (41)
38PropertyManager manager1 = Assert.IsAssignableFrom<PropertyManager>(context[dataSource1, "Property"]); 39PropertyManager manager2 = Assert.IsAssignableFrom<PropertyManager>(context[dataSource2, "Property"]); 75Assert.Same(source1.CurrencyManager, context[dataSource, null]); 76Assert.Same(source1.CurrencyManager, context[dataSource, string.Empty]); 82Assert.Same(source2.CurrencyManager, context[dataSource, null]); 83Assert.Same(source2.CurrencyManager, context[dataSource, string.Empty]); 120Assert.Same(source1.CurrencyManager, context[dataSource, null]); 121Assert.Same(source1.CurrencyManager, context[dataSource, string.Empty]); 127Assert.Same(source2.CurrencyManager, context[dataSource, null]); 128Assert.Same(source2.CurrencyManager, context[dataSource, string.Empty]); 184PropertyManager manager1 = Assert.IsAssignableFrom<PropertyManager>(context[dataSource1, "Property"]); 185PropertyManager manager2 = Assert.IsAssignableFrom<PropertyManager>(context[dataSource2, "Property"]); 213PropertyManager manager1 = Assert.IsAssignableFrom<PropertyManager>(context[dataSource1, "Property"]); 214PropertyManager manager2 = Assert.IsAssignableFrom<PropertyManager>(context[dataSource2, "Property"]); 379Assert.NotNull(context[dataSource2, "Property"]); 484Assert.Same(manager, context[mockCurrencyManagerProvider.Object, "dataMember"]); 522PropertyManager manager = Assert.IsAssignableFrom<PropertyManager>(context[dataSource, dataMember]); 527Assert.Same(manager, context[dataSource, dataMember]); 528Assert.Same(manager, context[dataSource, dataMember.ToLowerInvariant()]); 538Assert.Throws<ArgumentException>(() => context[dataSource, "Property"]); 548PropertyManager manager = Assert.IsType<PropertyManager>(context[dataSource, dataMember]); 551Assert.Same(manager, context[dataSource, string.Empty]); 553Assert.Same(manager, context[dataSource, null]); 566Assert.Throws<ArgumentException>(() => context[dataSource, dataMember]); 579CurrencyManager manager = Assert.IsAssignableFrom<CurrencyManager>(context[dataSource, "Property"]); 585Assert.Same(manager, context[dataSource, "Property"]); 598PropertyManager manager = Assert.IsAssignableFrom<PropertyManager>(context[dataSource, "Property"]); 603Assert.Same(manager, context[dataSource, "Property"]); 616CurrencyManager manager = Assert.IsAssignableFrom<CurrencyManager>(context[dataSource, "Property"]); 622Assert.Same(manager, context[dataSource, "Property"]); 638CurrencyManager manager = Assert.IsAssignableFrom<CurrencyManager>(context[dataSource, "Property"]); 644Assert.Same(manager, context[dataSource, "Property"]); 659PropertyManager manager = Assert.IsAssignableFrom<PropertyManager>(context[dataSource, "Property"]); 664Assert.Same(manager, context[dataSource, "Property"]); 682Assert.Throws<ArgumentNullException>("dataSource", () => context[dataSource, "Property"]); 700PropertyManager manager = Assert.IsAssignableFrom<PropertyManager>(context[dataSource, "Property"]); 705Assert.Same(manager, context[dataSource, "Property"]); 735Assert.Throws<ArgumentNullException>("dataSource", () => context[null, null]); 736Assert.Throws<ArgumentNullException>("dataSource", () => context[null, string.Empty]); 841PropertyManager manager = Assert.IsAssignableFrom<PropertyManager>(context[dataSource, "Property"]); 860CurrencyManager manager = Assert.IsAssignableFrom<CurrencyManager>(context[dataSource, "Property"]);