WinForms – Bind controls to an object data source

Mapping classes to WinForm controls manually is probably the most tedious thing you can do in coding. In order to minimize this coding effort, you can bind your controls to an object data source. In this article, I’ll show how to do this in a WinForms App (.NET Core+) project. First, I’ll show step-by-step how … Read more

Complex DataBinding accepts as a data source either an IList or an IListSource

If you try to set a list control’s DataSource to a type it can’t handle, then you’ll get the following exception: System.ArgumentException: Complex DataBinding accepts as a data source either an IList or an IListSource. (Parameter ‘value’)at System.Windows.Forms.ListControl.set_DataSource(Object value) Note: This applies to all controls that subclass ListControl, such as ComboBox and ListBox. This is … Read more