docs-desktop icon indicating copy to clipboard operation
docs-desktop copied to clipboard

No code example.

Open tutiplain opened this issue 3 years ago • 3 comments

A code example would be nice.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

tutiplain avatar May 01 '21 17:05 tutiplain

@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. 😦

adegeo avatar May 03 '21 18:05 adegeo

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.

tutiplain avatar May 04 '21 15:05 tutiplain

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.

adegeo avatar May 04 '21 21:05 adegeo