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