docs-desktop
docs-desktop copied to clipboard
No code example.
A code example would be nice.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 60437be6-3988-5101-f995-4d354d8d7c5a
- Version Independent ID: d104eb24-c091-29a7-742c-5ba7373aa769
- Content: BindingSource Component Overview - Windows Forms .NET Framework
- Content Source: dotnet-desktop-guide/framework/winforms/controls/bindingsource-component-overview.md
- Product: dotnet-framework
- Technology: dotnet-winforms
- GitHub Login: @adegeo
- Microsoft Alias: adegeo
@tutiplain Hi there. Thank you for the feedback. At this moment we're not really updating documentation in the .NET Framework space. We're currently working on updating things for the .NET 5 (.NET Core) area, however, WinForms has been on pause while we got the WPF area started. We'll probably start working on WinForms again this month though.
I need to go through and really write up the migration plan for WinForms, as I did for WPF. As part of that plan, I'll note this issue. I'll keep this issue open until I do. Thank you again for the feedback!
I wanted to add that I think these articles were really written with the idea that you drag-drop this component into your form through the editor, and then use the wizards provided to configure it. This is probably why there aren't any code examples provided. 😦
I was actually looking to use the BindingSource component to tie a repository class that internally uses EntityFramework 6 to retrieve and write data. The wizards are not really much help with that. I did learn from this document that I need to either implement the IList interface or the IEnumerable interface (and this last one also requires another implementation of IEnumerator). This seemed like a lot of boilerplate code for what I wanted to do, and without an example to work with I wasn't even sure it was going to work, so I decided to implement record navigation directly in my form, but that also hasn't worked out well. I think I might skip the record navigation feature of the app I'm creating and just have the user do a search on another form.
Hi @tutiplain There are many different types that implement IList or IEnumerable, such as the List<> type. I would assume you could use one of those collection types instead of implementing your own.
When we get to porting this content for .NET 5+, we'll have more code examples. Sorry about that.