-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Adam O'Neil edited this page Mar 23, 2020
·
19 revisions
WinForms.Library is a set of helper classes for data binding and using Json-backed document objects with my JsonSettings project. It's also a grab-bag of miscellaneous controls and extensions I reuse across several WinForm apps. I still work with WinForms a fair amount, and I noticed a lot of redundant data binding code, so this library grew out of a need to unify and standardize how I do that. I always felt that off-the-shelf data binding in .NET was too complicated and designer-dependent. A while back I wrote a CodeProject article about this, and this library is an update on that, removing the ORM dependency and simplifying things a bit more.
- ControlBinder for generic data binding with standard WinForm controls. Examples: SourceFolderCleanup project
- JsonSDI for opening and saving Json-based documents.
- FileSystem static class: Search, Icon retrieval, EnumFiles and Shell interaction.
-
GridCellAutoComplete for implementing auto complete text boxes in
DataGridView
controls.
-
GridViewBinder lets you data-bind a
DataGridView
with straightforward OnSave and OnDelete methods which are much simpler than off-the-shelf binding. See an example usage in CredManager2.
- BuilderTextBox combines an ordinary text box with a button to the right that can display a "builder dialog" to selecting or creating a value in the text box.
- OpenFileButton for providing a standard way to access a file from a ToolStrip button or menu.
- WebUrlLinkLabel is a standard LinkLabel setup to visit web URLs.
-
DropDownButton is a regular button control that renders a little dropdown chevron thingy on the right side. When clicked, displays the button's
ContextMenuStrip
underneath it. I couldn't figure out how to override the text rendering so it offsets correctly for the graphic, but you can work around by adding a few spaces to the end of your text.
- ComboBoxExtensions for setting and getting values from combo boxes.
-
ToolStripComboBoxExtensions similar to the regular combo box extension, but for
ToolStripComboBox
.
- IBoundControl for implementing your own user controls with ControlBinder.
- FormPosition for saving and retrieving form positions.