looking for a winfowms mvc sample
Loading
looking for a winfowms mvc sample
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Matthew HessPosted May 31, 2025, 9:21 PM
The MVC pattern in WinForms is supported natively through the concept of "Data Binding" and various classes in the System.ComponentModel namespace. For example, BindingSource provides the "controller" element which sits between a data source (such as a data table) and various controls (such as data grids or list boxes) and BindingList which is a data binding aware implementation of a List. In a simple Winforms app it is possible to do all this this without writing any code. You just drag the controls and the binding sources onto your form and configure their properties through the property editors. If you look at the Microsoft documentation for the various classes in System.ComponentModel, I think that should get you started. For more sophisticated and visually rich Winforms applications, it is common to purchase a 3rd party toolset such as those offered by Infragistics, Teleric and Developer Express. These tools also use the same databinding MVP concepts but provide a much more sophisticated visual implementation than the plane jane Winforms controls. Good luck!
-Matthew (YouTube: @CSharpArtisan)