forked from dotnet/dotnet-api-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBindingSource.xml
More file actions
3967 lines (3607 loc) · 269 KB
/
BindingSource.xml
File metadata and controls
3967 lines (3607 loc) · 269 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<Type Name="BindingSource" FullName="System.Windows.Forms.BindingSource">
<TypeSignature Language="C#" Value="public class BindingSource : System.ComponentModel.Component, System.Collections.IList, System.ComponentModel.IBindingListView, System.ComponentModel.ICancelAddNew, System.ComponentModel.ISupportInitialize, System.ComponentModel.ISupportInitializeNotification, System.ComponentModel.ITypedList, System.Windows.Forms.ICurrencyManagerProvider" FrameworkAlternate="net-5.0;netcore-3.0;netcore-3.1" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit BindingSource extends System.ComponentModel.Component implements class System.Collections.ICollection, class System.Collections.IEnumerable, class System.Collections.IList, class System.ComponentModel.IBindingList, class System.ComponentModel.IBindingListView, class System.ComponentModel.ICancelAddNew, class System.ComponentModel.ISupportInitialize, class System.ComponentModel.ISupportInitializeNotification, class System.ComponentModel.ITypedList, class System.Windows.Forms.ICurrencyManagerProvider" />
<TypeSignature Language="DocId" Value="T:System.Windows.Forms.BindingSource" />
<TypeSignature Language="VB.NET" Value="Public Class BindingSource
Inherits Component
Implements IBindingListView, ICancelAddNew, ICurrencyManagerProvider, IList, ISupportInitialize, ISupportInitializeNotification, ITypedList" FrameworkAlternate="net-5.0;netcore-3.0;netcore-3.1" />
<TypeSignature Language="C++ CLI" Value="public ref class BindingSource : System::ComponentModel::Component, System::Collections::IList, System::ComponentModel::IBindingListView, System::ComponentModel::ICancelAddNew, System::ComponentModel::ISupportInitialize, System::ComponentModel::ISupportInitializeNotification, System::ComponentModel::ITypedList, System::Windows::Forms::ICurrencyManagerProvider" FrameworkAlternate="net-5.0;netcore-3.0;netcore-3.1" />
<TypeSignature Language="F#" Value="type BindingSource = class
 inherit Component
 interface IBindingListView
 interface ICollection
 interface IEnumerable
 interface IList
 interface IBindingList
 interface ITypedList
 interface ICancelAddNew
 interface ISupportInitializeNotification
 interface ISupportInitialize
 interface ICurrencyManagerProvider" FrameworkAlternate="net-5.0;netcore-3.0;netcore-3.1" />
<TypeSignature Language="C#" Value="public class BindingSource : System.ComponentModel.Component, System.Collections.IList, System.ComponentModel.IBindingListView, System.ComponentModel.ICancelAddNew, System.ComponentModel.ISupportInitializeNotification, System.ComponentModel.ITypedList, System.Windows.Forms.ICurrencyManagerProvider" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<TypeSignature Language="VB.NET" Value="Public Class BindingSource
Inherits Component
Implements IBindingListView, ICancelAddNew, ICurrencyManagerProvider, IList, ISupportInitializeNotification, ITypedList" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<TypeSignature Language="C++ CLI" Value="public ref class BindingSource : System::ComponentModel::Component, System::Collections::IList, System::ComponentModel::IBindingListView, System::ComponentModel::ICancelAddNew, System::ComponentModel::ISupportInitializeNotification, System::ComponentModel::ITypedList, System::Windows::Forms::ICurrencyManagerProvider" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<TypeSignature Language="F#" Value="type BindingSource = class
 inherit Component
 interface IBindingListView
 interface IBindingList
 interface IList
 interface ICollection
 interface IEnumerable
 interface ITypedList
 interface ICancelAddNew
 interface ISupportInitializeNotification
 interface ISupportInitialize
 interface ICurrencyManagerProvider" FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8" />
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.ComponentModel.Component</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.Collections.ICollection</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Collections.IEnumerable</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Collections.IList</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.ComponentModel.IBindingList</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.ComponentModel.IBindingListView</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.ComponentModel.ICancelAddNew</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.ComponentModel.ISupportInitialize</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.ComponentModel.ISupportInitializeNotification</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.ComponentModel.ITypedList</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.Windows.Forms.ICurrencyManagerProvider</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.ComplexBindingProperties("DataSource", "DataMember")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.ComplexBindingProperties("DataSource", "DataMember")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultEvent("CurrentChanged")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultEvent("CurrentChanged")>]</AttributeName>
</Attribute>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.DefaultProperty("DataSource")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.DefaultProperty("DataSource")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="net-5.0;netcore-3.0;netcore-3.1;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8">
<AttributeName Language="C#">[System.ComponentModel.Designer("System.Windows.Forms.Design.BindingSourceDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Designer("System.Windows.Forms.Design.BindingSourceDesigner, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")>]</AttributeName>
</Attribute>
<Attribute FrameworkAlternate="netframework-2.0;netframework-3.0;netframework-3.5">
<AttributeName Language="C#">[System.ComponentModel.Designer("System.Windows.Forms.Design.BindingSourceDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Designer("System.Windows.Forms.Design.BindingSourceDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")>]</AttributeName>
</Attribute>
</Attributes>
<Docs>
<summary>Encapsulates the data source for a form.</summary>
<remarks>
<format type="text/markdown">< and [How to: Handle Errors and Exceptions that Occur with Databinding](/dotnet/framework/winforms/controls/how-to-handle-errors-and-exceptions-that-occur-with-databinding). Navigation and updating of the data source is accomplished through methods such as <xref:System.Windows.Forms.BindingSource.MoveNext%2A>, <xref:System.Windows.Forms.BindingSource.MoveLast%2A>, and <xref:System.Windows.Forms.BindingSource.Remove%2A>. Operations such as sorting and filtering are handled through the <xref:System.Windows.Forms.BindingSource.Sort%2A> and <xref:System.Windows.Forms.BindingSource.Filter%2A> properties. For more information on using sorting and filtering with the <xref:System.Windows.Forms.BindingSource>, see [How to: Sort and Filter ADO.NET Data with the Windows Forms BindingSource Component](/dotnet/framework/winforms/controls/sort-and-filter-ado-net-data-with-wf-bindingsource-component).
In addition, the <xref:System.Windows.Forms.BindingSource> component can act as a strongly typed data source. Typically the type of the underlying data source is fixed through one of the following mechanisms:
- Use the <xref:System.Windows.Forms.BindingSource.Add%2A> method to add an item to the <xref:System.Windows.Forms.BindingSource> component.
- Set the <xref:System.Windows.Forms.BindingSource.DataSource%2A> property to a list, single object, or type.
Both of these mechanisms create a strongly-typed list. For more information on how to use the <xref:System.Windows.Forms.BindingSource> to bind to a type, see [How to: Bind a Windows Forms Control to a Type](/dotnet/framework/winforms/controls/how-to-bind-a-windows-forms-control-to-a-type). You can also use the <xref:System.Windows.Forms.BindingSource> to bind your controls to a factory object. For more information on how to do this, see [How to: Bind a Windows Forms Control to a Factory Object](/dotnet/framework/winforms/controls/how-to-bind-a-windows-forms-control-to-a-factory-object).
> [!NOTE]
> Because a <xref:System.Windows.Forms.BindingSource> handles both simple and complex data sources, terminology is problematic. Within this class documentation, the term *list* refers to a data collection within the hosted data source, and *item* denotes a single element. When discussing functionality associated with complex data sources, the equivalent terms *table* and *row* are used.
<xref:System.Windows.Forms.BindingSource> provides members for accessing the underlying data. The current item can be retrieved through the <xref:System.Windows.Forms.BindingSource.Current%2A> property, and the entire list can be retrieved through the <xref:System.Windows.Forms.BindingSource.List%2A> property. Editing operations are supported on the current item through <xref:System.Windows.Forms.BindingSource.Current%2A> and the <xref:System.Windows.Forms.BindingSource.RemoveCurrent%2A>, <xref:System.Windows.Forms.BindingSource.EndEdit%2A>, <xref:System.Windows.Forms.BindingSource.CancelEdit%2A> and <xref:System.Windows.Forms.BindingSource.Add%2A> and <xref:System.Windows.Forms.BindingSource.AddNew%2A> methods. Although currency management is handled automatically for all underlying data source types, this class exposes a number of events, such as <xref:System.Windows.Forms.BindingSource.CurrentItemChanged> and <xref:System.Windows.Forms.BindingSource.DataSourceChanged>, that allow for customization.
Data sources that are bound to a <xref:System.Windows.Forms.BindingSource> component can also be navigated and managed with the <xref:System.Windows.Forms.BindingNavigator> class, which provides a VCR-like user interface (UI) for navigating items within a list. Although <xref:System.Windows.Forms.BindingNavigator> can be bound to any data source, it was designed to integrate with a <xref:System.Windows.Forms.BindingSource> component through its <xref:System.Windows.Forms.BindingNavigator.BindingSource%2A?displayProperty=nameWithType> property.
The default property for the <xref:System.Windows.Forms.BindingSource> class is <xref:System.Windows.Forms.BindingSource.DataSource%2A>. The default event is <xref:System.Windows.Forms.BindingSource.CurrentChanged>.
> [!CAUTION]
> Many of the members of the <xref:System.Windows.Forms.BindingSource> class operate on the underlying list represented by the <xref:System.Windows.Forms.BindingSource.List%2A> property and simply refer their operation to the underlying list. Therefore, when the <xref:System.Windows.Forms.BindingSource> is bound to a custom implementation of <xref:System.Collections.IList>, the exact behavior of these members may differ from the behavior described in the class documentation. For example, the <xref:System.Windows.Forms.BindingSource.RemoveAt%2A> method calls <xref:System.Collections.IList.RemoveAt%2A?displayProperty=nameWithType>. The <xref:System.Windows.Forms.BindingSource> documentation describes the <xref:System.Windows.Forms.BindingSource.RemoveAt%2A> method with the understanding that the <xref:System.Collections.IList.RemoveAt%2A> method for the underlying <xref:System.Collections.IList> is correctly implemented.
## Examples
The following code example demonstrates a <xref:System.Windows.Forms.ListBox> bound to a <xref:System.Windows.Forms.BindingSource>. The <xref:System.Windows.Forms.BindingSource> is bound to a <xref:System.ComponentModel.BindingList%601> that contains a list of fonts.
[!code-csharp[System.Windows.Forms.BindingSourceAndBindingListOfT#0](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.BindingSourceAndBindingListOfT/CS/Form1.cs#0)]
[!code-vb[System.Windows.Forms.BindingSourceAndBindingListOfT#0](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.BindingSourceAndBindingListOfT/VB/Form1.vb#0)]
]]></format>
</remarks>
<altmember cref="T:System.Windows.Forms.BindingSource" />
<altmember cref="T:System.Windows.Forms.BindingNavigator" />
<altmember cref="T:System.Windows.Forms.DataGridView" />
<altmember cref="T:System.Windows.Forms.CurrencyManager" />
<altmember cref="T:System.Collections.IList" />
<altmember cref="T:System.ComponentModel.IBindingList" />
<altmember cref="T:System.ComponentModel.IEditableObject" />
<related type="Article" href="/dotnet/framework/winforms/controls/bindingsource-component">BindingSource Component</related>
</Docs>
<Members>
<MemberGroup MemberName=".ctor">
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Forms.BindingSource" /> class.</summary>
</Docs>
</MemberGroup>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public BindingSource ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.#ctor" />
<MemberSignature Language="VB.NET" Value="Public Sub New ()" />
<MemberSignature Language="C++ CLI" Value="public:
 BindingSource();" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Forms.BindingSource" /> class to the default property values.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The following table shows the default <xref:System.Windows.Forms.BindingSource> property values initialized by this constructor.
|Property|Default value|
|--------------|-------------------|
|<xref:System.Windows.Forms.BindingSource.DataSource%2A>|`null`|
|<xref:System.Windows.Forms.BindingSource.DataMember%2A>|<xref:System.String.Empty>|
|<xref:System.Windows.Forms.BindingSource.Sort%2A>|`null`|
|<xref:System.Windows.Forms.BindingSource.Filter%2A>|`null`|
|<xref:System.Windows.Forms.BindingSource.RaiseListChangedEvents%2A>|`true`|
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingSource.DataSource" />
<altmember cref="P:System.Windows.Forms.BindingSource.DataMember" />
<altmember cref="T:System.Windows.Forms.CurrencyManager" />
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public BindingSource (System.ComponentModel.IContainer container);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.ComponentModel.IContainer container) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.#ctor(System.ComponentModel.IContainer)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (container As IContainer)" />
<MemberSignature Language="C++ CLI" Value="public:
 BindingSource(System::ComponentModel::IContainer ^ container);" />
<MemberSignature Language="F#" Value="new System.Windows.Forms.BindingSource : System.ComponentModel.IContainer -> System.Windows.Forms.BindingSource" Usage="new System.Windows.Forms.BindingSource container" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="container" Type="System.ComponentModel.IContainer" />
</Parameters>
<Docs>
<param name="container">The <see cref="T:System.ComponentModel.IContainer" /> to add the current <see cref="T:System.Windows.Forms.BindingSource" /> to.</param>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Forms.BindingSource" /> class and adds the <see cref="T:System.Windows.Forms.BindingSource" /> to the specified container.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This constructor calls the parameterless constructor, and then adds the current <xref:System.Windows.Forms.BindingSource> to the specified container. It is not typically used by the solutions programmer, but instead by authors of design-time environments.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public BindingSource (object dataSource, string dataMember);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(object dataSource, string dataMember) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.#ctor(System.Object,System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub New (dataSource As Object, dataMember As String)" />
<MemberSignature Language="C++ CLI" Value="public:
 BindingSource(System::Object ^ dataSource, System::String ^ dataMember);" />
<MemberSignature Language="F#" Value="new System.Windows.Forms.BindingSource : obj * string -> System.Windows.Forms.BindingSource" Usage="new System.Windows.Forms.BindingSource (dataSource, dataMember)" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="dataSource" Type="System.Object" />
<Parameter Name="dataMember" Type="System.String" />
</Parameters>
<Docs>
<param name="dataSource">The data source for the <see cref="T:System.Windows.Forms.BindingSource" />.</param>
<param name="dataMember">The specific column or list name within the data source to bind to.</param>
<summary>Initializes a new instance of the <see cref="T:System.Windows.Forms.BindingSource" /> class with the specified data source and data member.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Add">
<MemberSignature Language="C#" Value="public virtual int Add (object value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance int32 Add(object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.Add(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function Add (value As Object) As Integer" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual int Add(System::Object ^ value);" />
<MemberSignature Language="F#" Value="abstract member Add : obj -> int
override this.Add : obj -> int" Usage="bindingSource.Add value" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IList.Add(System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="value">An <see cref="T:System.Object" /> to be added to the internal list.</param>
<summary>Adds an existing item to the internal list.</summary>
<returns>The zero-based index at which <paramref name="value" /> was added to the underlying list represented by the <see cref="P:System.Windows.Forms.BindingSource.List" /> property.</returns>
<remarks>
<format type="text/markdown"><]
[!code-vb[System.Windows.Forms.BindingSourceMethods#6](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.BindingSourceMethods/VB/Form1.vb#6)]
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">
<paramref name="value" /> differs in type from the existing items in the underlying list.</exception>
<altmember cref="P:System.Windows.Forms.BindingSource.List" />
<altmember cref="P:System.Windows.Forms.BindingSource.Position" />
<altmember cref="M:System.Windows.Forms.BindingSource.AddNew" />
<altmember cref="M:System.Windows.Forms.BindingSource.Remove(System.Object)" />
<altmember cref="M:System.Windows.Forms.BindingSource.RemoveCurrent" />
<altmember cref="M:System.Windows.Forms.BindingSource.Insert(System.Int32,System.Object)" />
</Docs>
</Member>
<Member MemberName="AddingNew">
<MemberSignature Language="C#" Value="public event System.ComponentModel.AddingNewEventHandler AddingNew;" />
<MemberSignature Language="ILAsm" Value=".event class System.ComponentModel.AddingNewEventHandler AddingNew" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.BindingSource.AddingNew" />
<MemberSignature Language="VB.NET" Value="Public Custom Event AddingNew As AddingNewEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:
 event System::ComponentModel::AddingNewEventHandler ^ AddingNew;" />
<MemberSignature Language="F#" Value="member this.AddingNew : System.ComponentModel.AddingNewEventHandler " Usage="member this.AddingNew : System.ComponentModel.AddingNewEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.ComponentModel.AddingNewEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs before an item is added to the underlying list.</summary>
<remarks>
<format type="text/markdown"><.
## Examples
The following code example uses a <xref:System.Windows.Forms.BindingSource> component to bind a list to a <xref:System.Windows.Forms.DataGridView> control. New items are added to the list by the <xref:System.Windows.Forms.BindingSource.AddingNew> event handler. This code example is part of a larger example provided in [How to: Customize Item Addition with the Windows Forms BindingSource](/dotnet/framework/winforms/controls/how-to-customize-item-addition-with-the-windows-forms-bindingsource).
[!code-cpp[System.Windows.Forms.DataConnector.AddingNew#8](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.AddingNew/CPP/form1.cpp#8)]
[!code-csharp[System.Windows.Forms.DataConnector.AddingNew#8](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.AddingNew/CS/form1.cs#8)]
[!code-vb[System.Windows.Forms.DataConnector.AddingNew#8](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.AddingNew/VB/form1.vb#8)]
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">
<see cref="P:System.ComponentModel.AddingNewEventArgs.NewObject" /> is not the same type as the type contained in the list.</exception>
<altmember cref="M:System.Windows.Forms.BindingSource.AddNew" />
<altmember cref="M:System.Windows.Forms.BindingSource.OnAddingNew(System.ComponentModel.AddingNewEventArgs)" />
<altmember cref="T:System.ComponentModel.AddingNewEventArgs" />
</Docs>
</Member>
<Member MemberName="AddNew">
<MemberSignature Language="C#" Value="public virtual object AddNew ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance object AddNew() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.AddNew" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function AddNew () As Object" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual System::Object ^ AddNew();" />
<MemberSignature Language="F#" Value="abstract member AddNew : unit -> obj
override this.AddNew : unit -> obj" Usage="bindingSource.AddNew " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.ComponentModel.IBindingList.AddNew</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Adds a new item to the underlying list.</summary>
<returns>The <see cref="T:System.Object" /> that was created and added to the list.</returns>
<remarks>
<format type="text/markdown"><.
[!code-cpp[System.Windows.Forms.DataConnector.AddingNew#7](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.AddingNew/CPP/form1.cpp#7)]
[!code-csharp[System.Windows.Forms.DataConnector.AddingNew#7](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.AddingNew/CS/form1.cs#7)]
[!code-vb[System.Windows.Forms.DataConnector.AddingNew#7](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.AddingNew/VB/form1.vb#7)]
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">The <see cref="P:System.Windows.Forms.BindingSource.AllowNew" /> property is set to <see langword="false" />.
-or-
A public parameterless constructor could not be found for the current item type.</exception>
<altmember cref="M:System.Windows.Forms.BindingSource.AddNew" />
<altmember cref="T:System.ComponentModel.AddingNewEventArgs" />
<altmember cref="E:System.Windows.Forms.BindingSource.AddingNew" />
<altmember cref="P:System.Windows.Forms.BindingSource.AllowNew" />
<altmember cref="T:System.ComponentModel.IBindingList" />
</Docs>
</Member>
<Member MemberName="AllowEdit">
<MemberSignature Language="C#" Value="public virtual bool AllowEdit { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool AllowEdit" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.BindingSource.AllowEdit" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property AllowEdit As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property bool AllowEdit { bool get(); };" />
<MemberSignature Language="F#" Value="member this.AllowEdit : bool" Usage="System.Windows.Forms.BindingSource.AllowEdit" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.ComponentModel.IBindingList.AllowEdit</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.Browsable(false)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Browsable(false)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether items in the underlying list can be edited.</summary>
<value>
<see langword="true" /> to indicate list items can be edited; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.BindingSource.AllowEdit%2A> property is typically used by other components to determine if editing of items in the list is allowed.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="AllowNew">
<MemberSignature Language="C#" Value="public virtual bool AllowNew { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool AllowNew" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.BindingSource.AllowNew" />
<MemberSignature Language="VB.NET" Value="Public Overridable Property AllowNew As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property bool AllowNew { bool get(); void set(bool value); };" />
<MemberSignature Language="F#" Value="member this.AllowNew : bool with get, set" Usage="System.Windows.Forms.BindingSource.AllowNew" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute FrameworkAlternate="netframework-4.0">
<AttributeName Language="C#">[get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]</AttributeName>
<AttributeName Language="F#">[<get: System.Runtime.TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets or sets a value indicating whether the <see cref="M:System.Windows.Forms.BindingSource.AddNew" /> method can be used to add items to the list.</summary>
<value>
<see langword="true" /> if <see cref="M:System.Windows.Forms.BindingSource.AddNew" /> can be used to add items to the list; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The default value for the <xref:System.Windows.Forms.BindingSource.AllowNew%2A> property depends on the underlying data source type. If the underlying list implements the <xref:System.ComponentModel.IBindingList> interface, this property will delegate to the underlying list. Otherwise, this property will return `false` if the underlying list has any of the following characteristics:
- It has a fixed size, as determined by the <xref:System.Collections.IList.IsFixedSize%2A?displayProperty=nameWithType> property.
- It is read-only, as determined by the <xref:System.Collections.IList.IsReadOnly%2A?displayProperty=nameWithType> property.
- The item's type does not have a parameterless constructor.
> [!NOTE]
> Once the value of this property is set, the getter no longer refers the call to the underlying list. Instead, it simply returns the value that was previously set until the <xref:System.Windows.Forms.BindingSource.ResetAllowNew%2A> method is called.
Setting this property raises the <xref:System.Windows.Forms.BindingSource.ListChanged> event with <xref:System.ComponentModel.ListChangedEventArgs.ListChangedType?displayProperty=nameWithType> set to <xref:System.ComponentModel.ListChangedType.Reset?displayProperty=nameWithType>.
If you set the <xref:System.Windows.Forms.BindingSource.AllowNew%2A> property to `true` and the underlying list type does not have a parameterless constructor, you must handle the <xref:System.Windows.Forms.BindingSource.AddingNew> event and create the appropriate type.
## Examples
The following code example demonstrates using the <xref:System.Windows.Forms.BindingSource.AllowNew%2A> property of the <xref:System.Windows.Forms.BindingSource> component to permit the user to add new items to the <xref:System.Windows.Forms.BindingSource> component's underlying list. Setting this property to `true` causes the bound <xref:System.Windows.Forms.DataGridView> control to display its row for new records.
[!code-cpp[System.Windows.Forms.DataConnector.ItemChangedEventMode#6](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.ItemChangedEventMode/CPP/form1.cpp#6)]
[!code-csharp[System.Windows.Forms.DataConnector.ItemChangedEventMode#6](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.ItemChangedEventMode/CS/form1.cs#6)]
[!code-vb[System.Windows.Forms.DataConnector.ItemChangedEventMode#6](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataConnector.ItemChangedEventMode/VB/form1.vb#6)]
]]></format>
</remarks>
<exception cref="T:System.InvalidOperationException">This property is set to <see langword="true" /> when the underlying list represented by the <see cref="P:System.Windows.Forms.BindingSource.List" /> property has a fixed size or is read-only.</exception>
<exception cref="T:System.MissingMethodException">The property is set to <see langword="true" /> and the <see cref="E:System.Windows.Forms.BindingSource.AddingNew" /> event is not handled when the underlying list type does not have a parameterless constructor.</exception>
<altmember cref="P:System.ComponentModel.AddingNewEventArgs.NewObject" />
<altmember cref="M:System.Windows.Forms.BindingSource.ResetAllowNew" />
<altmember cref="P:System.Windows.Forms.BindingSource.List" />
<altmember cref="P:System.Windows.Forms.BindingSource.AllowEdit" />
<altmember cref="P:System.Windows.Forms.BindingSource.AllowRemove" />
<altmember cref="M:System.Windows.Forms.BindingSource.EndEdit" />
<altmember cref="M:System.Windows.Forms.BindingSource.CancelEdit" />
<altmember cref="M:System.Windows.Forms.BindingSource.AddNew" />
</Docs>
</Member>
<Member MemberName="AllowRemove">
<MemberSignature Language="C#" Value="public virtual bool AllowRemove { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool AllowRemove" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.BindingSource.AllowRemove" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property AllowRemove As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property bool AllowRemove { bool get(); };" />
<MemberSignature Language="F#" Value="member this.AllowRemove : bool" Usage="System.Windows.Forms.BindingSource.AllowRemove" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.ComponentModel.IBindingList.AllowRemove</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.Browsable(false)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Browsable(false)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets a value indicating whether items can be removed from the underlying list.</summary>
<value>
<see langword="true" /> to indicate list items can be removed from the list; otherwise, <see langword="false" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.BindingSource.AllowRemove%2A> property is typically used by other components to determine if editing of items in the list is allowed.
]]></format>
</remarks>
</Docs>
</Member>
<MemberGroup MemberName="ApplySort">
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Sorts the data source with the specified sort description or descriptions.</summary>
</Docs>
</MemberGroup>
<Member MemberName="ApplySort">
<MemberSignature Language="C#" Value="public virtual void ApplySort (System.ComponentModel.ListSortDescriptionCollection sorts);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void ApplySort(class System.ComponentModel.ListSortDescriptionCollection sorts) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.ApplySort(System.ComponentModel.ListSortDescriptionCollection)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub ApplySort (sorts As ListSortDescriptionCollection)" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual void ApplySort(System::ComponentModel::ListSortDescriptionCollection ^ sorts);" />
<MemberSignature Language="F#" Value="abstract member ApplySort : System.ComponentModel.ListSortDescriptionCollection -> unit
override this.ApplySort : System.ComponentModel.ListSortDescriptionCollection -> unit" Usage="bindingSource.ApplySort sorts" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.ComponentModel.IBindingListView.ApplySort(System.ComponentModel.ListSortDescriptionCollection)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="sorts" Type="System.ComponentModel.ListSortDescriptionCollection" />
</Parameters>
<Docs>
<param name="sorts">A <see cref="T:System.ComponentModel.ListSortDescriptionCollection" /> containing the sort descriptions to apply to the data source.</param>
<summary>Sorts the data source with the specified sort descriptions.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
<xref:System.ComponentModel.IBindingListView> implements multi-column sorting as a set of property descriptor-direction pairs.
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">The data source is not an <see cref="T:System.ComponentModel.IBindingListView" />.</exception>
</Docs>
</Member>
<Member MemberName="ApplySort">
<MemberSignature Language="C#" Value="public virtual void ApplySort (System.ComponentModel.PropertyDescriptor property, System.ComponentModel.ListSortDirection sort);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void ApplySort(class System.ComponentModel.PropertyDescriptor property, valuetype System.ComponentModel.ListSortDirection sort) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.ApplySort(System.ComponentModel.PropertyDescriptor,System.ComponentModel.ListSortDirection)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub ApplySort (property As PropertyDescriptor, sort As ListSortDirection)" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual void ApplySort(System::ComponentModel::PropertyDescriptor ^ property, System::ComponentModel::ListSortDirection sort);" />
<MemberSignature Language="F#" Value="abstract member ApplySort : System.ComponentModel.PropertyDescriptor * System.ComponentModel.ListSortDirection -> unit
override this.ApplySort : System.ComponentModel.PropertyDescriptor * System.ComponentModel.ListSortDirection -> unit" Usage="bindingSource.ApplySort (property, sort)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.ComponentModel.IBindingList.ApplySort(System.ComponentModel.PropertyDescriptor,System.ComponentModel.ListSortDirection)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="property" Type="System.ComponentModel.PropertyDescriptor" />
<Parameter Name="sort" Type="System.ComponentModel.ListSortDirection" />
</Parameters>
<Docs>
<param name="property">A <see cref="T:System.ComponentModel.PropertyDescriptor" /> that describes the property by which to sort the data source.</param>
<param name="sort">A <see cref="T:System.ComponentModel.ListSortDirection" /> indicating how the list should be sorted.</param>
<summary>Sorts the data source using the specified property descriptor and sort direction.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.ComponentModel.IBindingList> implements single column sorting using a <xref:System.ComponentModel.PropertyDescriptor> to indicate a property to sort by and a <xref:System.ComponentModel.ListSortDirection> indicating whether the property contents should be sorted in ascending or descending order.
]]></format>
</remarks>
<exception cref="T:System.NotSupportedException">The data source is not an <see cref="T:System.ComponentModel.IBindingList" />.</exception>
</Docs>
</Member>
<Member MemberName="BindingComplete">
<MemberSignature Language="C#" Value="public event System.Windows.Forms.BindingCompleteEventHandler BindingComplete;" />
<MemberSignature Language="ILAsm" Value=".event class System.Windows.Forms.BindingCompleteEventHandler BindingComplete" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.BindingSource.BindingComplete" />
<MemberSignature Language="VB.NET" Value="Public Custom Event BindingComplete As BindingCompleteEventHandler " />
<MemberSignature Language="C++ CLI" Value="public:
 event System::Windows::Forms::BindingCompleteEventHandler ^ BindingComplete;" />
<MemberSignature Language="F#" Value="member this.BindingComplete : System.Windows.Forms.BindingCompleteEventHandler " Usage="member this.BindingComplete : System.Windows.Forms.BindingCompleteEventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Windows.Forms.BindingCompleteEventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when all the clients have been bound to this <see cref="T:System.Windows.Forms.BindingSource" />.</summary>
<remarks>
<format type="text/markdown"><.
## Examples
The following code example demonstrates handling the <xref:System.Windows.Forms.BindingSource.BindingComplete> event. To run this code, paste it into an empty code file.
[!code-cpp[System.Windows.Forms.DataConnectorBindingComplete#3](~/samples/snippets/cpp/VS_Snippets_Winforms/System.Windows.Forms.DataConnectorBindingComplete/CPP/form1.cpp#3)]
[!code-csharp[System.Windows.Forms.DataConnectorBindingComplete#3](~/samples/snippets/csharp/VS_Snippets_Winforms/System.Windows.Forms.DataConnectorBindingComplete/CS/form1.cs#3)]
[!code-vb[System.Windows.Forms.DataConnectorBindingComplete#3](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataConnectorBindingComplete/VB/form1.vb#3)]
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingCompleteEventArgs.BindingCompleteState" />
<altmember cref="T:System.Windows.Forms.BindingCompleteEventArgs" />
</Docs>
</Member>
<Member MemberName="CancelEdit">
<MemberSignature Language="C#" Value="public void CancelEdit ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void CancelEdit() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.CancelEdit" />
<MemberSignature Language="VB.NET" Value="Public Sub CancelEdit ()" />
<MemberSignature Language="C++ CLI" Value="public:
 void CancelEdit();" />
<MemberSignature Language="F#" Value="member this.CancelEdit : unit -> unit" Usage="bindingSource.CancelEdit " />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Cancels the current edit operation.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
This method discards modifications to data since the last save or load operation if both of the following conditions are met:
- The data source implements the <xref:System.ComponentModel.IEditableObject> interface.
- The <xref:System.Windows.Forms.BindingSource.EndEdit%2A> method has not been called yet.
This method calls the <xref:System.Windows.Forms.CurrencyManager.CancelCurrentEdit%2A> method of the underlying <xref:System.Windows.Forms.CurrencyManager>, and is scoped to row-level changes.
]]></format>
</remarks>
<altmember cref="M:System.Windows.Forms.BindingSource.AddNew" />
<altmember cref="M:System.Windows.Forms.BindingSource.EndEdit" />
<altmember cref="T:System.ComponentModel.IEditableObject" />
</Docs>
</Member>
<Member MemberName="Clear">
<MemberSignature Language="C#" Value="public virtual void Clear ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Clear() cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.Clear" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub Clear ()" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual void Clear();" />
<MemberSignature Language="F#" Value="abstract member Clear : unit -> unit
override this.Clear : unit -> unit" Usage="bindingSource.Clear " />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IList.Clear</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>Removes all elements from the list.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The <xref:System.Windows.Forms.BindingSource.Clear%2A> method removes all elements from the underlying list represented by the <xref:System.Windows.Forms.BindingSource.List%2A> property and sets the <xref:System.Windows.Forms.BindingSource.Count%2A> property to zero.
This method raises the <xref:System.Windows.Forms.BindingSource.ListChanged> event.
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingSource.Count" />
<altmember cref="M:System.Windows.Forms.BindingSource.RemoveCurrent" />
<altmember cref="M:System.Windows.Forms.BindingSource.CancelEdit" />
</Docs>
</Member>
<Member MemberName="Contains">
<MemberSignature Language="C#" Value="public virtual bool Contains (object value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool Contains(object value) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.Contains(System.Object)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Function Contains (value As Object) As Boolean" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual bool Contains(System::Object ^ value);" />
<MemberSignature Language="F#" Value="abstract member Contains : obj -> bool
override this.Contains : obj -> bool" Usage="bindingSource.Contains value" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.IList.Contains(System.Object)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="value" Type="System.Object" />
</Parameters>
<Docs>
<param name="value">The <see cref="T:System.Object" /> to locate in the underlying list represented by the <see cref="P:System.Windows.Forms.BindingSource.List" /> property. The value can be <see langword="null" />.</param>
<summary>Determines whether an object is an item in the list.</summary>
<returns>
<see langword="true" /> if the <paramref name="value" /> parameter is found in the <see cref="P:System.Windows.Forms.BindingSource.List" />; otherwise, <see langword="false" />.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
Although the implementation is dependent on the underlying list's `Contains` method, typically the following characteristics apply:
- <xref:System.Windows.Forms.BindingSource.List%2A> is searched starting at the first element and ending at the last element.
- The underlying method performs a linear search; therefore, the average execution time is proportional to the value of the <xref:System.Windows.Forms.BindingSource.Count%2A> property.
- The underlying method determines equality by calling the <xref:System.Object.Equals%2A> method.
]]></format>
</remarks>
<altmember cref="M:System.Windows.Forms.BindingSource.IndexOf(System.Object)" />
<altmember cref="P:System.Windows.Forms.BindingSource.Count" />
<altmember cref="P:System.Windows.Forms.BindingSource.Position" />
<altmember cref="P:System.Windows.Forms.BindingSource.Item(System.Int32)" />
<altmember cref="M:System.Windows.Forms.BindingSource.Find(System.ComponentModel.PropertyDescriptor,System.Object)" />
</Docs>
</Member>
<Member MemberName="CopyTo">
<MemberSignature Language="C#" Value="public virtual void CopyTo (Array arr, int index);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void CopyTo(class System.Array arr, int32 index) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Windows.Forms.BindingSource.CopyTo(System.Array,System.Int32)" />
<MemberSignature Language="VB.NET" Value="Public Overridable Sub CopyTo (arr As Array, index As Integer)" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual void CopyTo(Array ^ arr, int index);" />
<MemberSignature Language="F#" Value="abstract member CopyTo : Array * int -> unit
override this.CopyTo : Array * int -> unit" Usage="bindingSource.CopyTo (arr, index)" />
<MemberType>Method</MemberType>
<Implements>
<InterfaceMember>M:System.Collections.ICollection.CopyTo(System.Array,System.Int32)</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="arr" Type="System.Array" />
<Parameter Name="index" Type="System.Int32" />
</Parameters>
<Docs>
<param name="arr">The destination array.</param>
<param name="index">The index in the destination array at which to start the copy operation.</param>
<summary>Copies the contents of the <see cref="P:System.Windows.Forms.BindingSource.List" /> to the specified array, starting at the specified index value.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
You can use this method to combine items from multiple sources into a single array.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Count">
<MemberSignature Language="C#" Value="public virtual int Count { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance int32 Count" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.BindingSource.Count" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property Count As Integer" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property int Count { int get(); };" />
<MemberSignature Language="F#" Value="member this.Count : int" Usage="System.Windows.Forms.BindingSource.Count" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Collections.ICollection.Count</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.Browsable(false)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Browsable(false)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the total number of items in the underlying list, taking the current <see cref="P:System.Windows.Forms.BindingSource.Filter" /> value into consideration.</summary>
<value>The total number of filtered items in the underlying list.</value>
<remarks>
<format type="text/markdown"><]
[!code-vb[System.Windows.Forms.DataConnectorFilterAndSort#2](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.DataConnectorFilterAndSort/VB/form1.vb#2)]
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingSource.List" />
<altmember cref="P:System.Windows.Forms.BindingSource.Position" />
<altmember cref="P:System.Windows.Forms.BindingSource.Current" />
</Docs>
</Member>
<Member MemberName="CurrencyManager">
<MemberSignature Language="C#" Value="public virtual System.Windows.Forms.CurrencyManager CurrencyManager { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Windows.Forms.CurrencyManager CurrencyManager" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.BindingSource.CurrencyManager" />
<MemberSignature Language="VB.NET" Value="Public Overridable ReadOnly Property CurrencyManager As CurrencyManager" />
<MemberSignature Language="C++ CLI" Value="public:
 virtual property System::Windows::Forms::CurrencyManager ^ CurrencyManager { System::Windows::Forms::CurrencyManager ^ get(); };" />
<MemberSignature Language="F#" Value="member this.CurrencyManager : System.Windows.Forms.CurrencyManager" Usage="System.Windows.Forms.BindingSource.CurrencyManager" />
<MemberType>Property</MemberType>
<Implements>
<InterfaceMember>P:System.Windows.Forms.ICurrencyManagerProvider.CurrencyManager</InterfaceMember>
</Implements>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.Browsable(false)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Browsable(false)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Windows.Forms.CurrencyManager</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the currency manager associated with this <see cref="T:System.Windows.Forms.BindingSource" />.</summary>
<value>The <see cref="T:System.Windows.Forms.CurrencyManager" /> associated with this <see cref="T:System.Windows.Forms.BindingSource" />.</value>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
If you want to access the currency manager for another binding to the same data member use the <xref:System.Windows.Forms.BindingSource.GetRelatedCurrencyManager%2A> method.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Current">
<MemberSignature Language="C#" Value="public object Current { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance object Current" />
<MemberSignature Language="DocId" Value="P:System.Windows.Forms.BindingSource.Current" />
<MemberSignature Language="VB.NET" Value="Public ReadOnly Property Current As Object" />
<MemberSignature Language="C++ CLI" Value="public:
 property System::Object ^ Current { System::Object ^ get(); };" />
<MemberSignature Language="F#" Value="member this.Current : obj" Usage="System.Windows.Forms.BindingSource.Current" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName Language="C#">[System.ComponentModel.Browsable(false)]</AttributeName>
<AttributeName Language="F#">[<System.ComponentModel.Browsable(false)>]</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Docs>
<summary>Gets the current item in the list.</summary>
<value>An <see cref="T:System.Object" /> that represents the current item in the underlying list represented by the <see cref="P:System.Windows.Forms.BindingSource.List" /> property, or <see langword="null" /> if the list has no items.</value>
<remarks>
<format type="text/markdown"><]
[!code-vb[System.Windows.Forms.BindingSourceMethods#6](~/samples/snippets/visualbasic/VS_Snippets_Winforms/System.Windows.Forms.BindingSourceMethods/VB/Form1.vb#6)]
]]></format>
</remarks>
<altmember cref="P:System.Windows.Forms.BindingSource.List" />
<altmember cref="P:System.Windows.Forms.BindingSource.Position" />
<altmember cref="P:System.Windows.Forms.BindingSource.Count" />
</Docs>
</Member>
<Member MemberName="CurrentChanged">
<MemberSignature Language="C#" Value="public event EventHandler CurrentChanged;" />
<MemberSignature Language="ILAsm" Value=".event class System.EventHandler CurrentChanged" />
<MemberSignature Language="DocId" Value="E:System.Windows.Forms.BindingSource.CurrentChanged" />
<MemberSignature Language="VB.NET" Value="Public Custom Event CurrentChanged As EventHandler " />
<MemberSignature Language="C++ CLI" Value="public:
 event EventHandler ^ CurrentChanged;" />
<MemberSignature Language="F#" Value="member this.CurrentChanged : EventHandler " Usage="member this.CurrentChanged : System.EventHandler " />
<MemberType>Event</MemberType>
<AssemblyInfo>
<AssemblyName>System.Windows.Forms</AssemblyName>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.EventHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>Occurs when the currently bound item changes.</summary>
<remarks>
<format type="text/markdown"><![CDATA[