WinForms
Windows Forms is the desktop UI stack that ships with .NET: a form, controls on it, and a message loop that
turns a click into an event. It is old, it is still supported on .NET 10, and it is the shortest path from a
C# programmer to a working Windows application.
It is also Windows only, which shapes this site's course. WinForms draws through the Windows desktop APIs,
so every listing in the course is compiled in a Linux container for
net10.0-windows and never started; the pages say so, and they describe a control's
behaviour as the documentation does. The logic that draws nothing, a validator, a view model, a presenter, is
plain .NET code: that is run headless, and the course builds its testing part on it.
Read the course in order. If you only need one answer, the first lesson explains where WinForms fits next to
WPF , MAUI and
ASP.NET Core , and the eighth explains exactly what can and cannot be
checked on Linux.
All articles
winforms/
course/ (93)
WinForms course: from the first form to a tested desktop application
1 What WinForms is and where it fits
2 The project file for net10.0-windows
3 Program.cs and ApplicationConfiguration.Initialize
4 The message loop and Application.Run
5 A form written by hand
6 Form1.cs, Form1.Designer.cs and Form1.resx
7 The offline feed and the restore
8 What can and cannot be checked on Linux
9 Label
10 Button
11 TextBox
12 CheckBox and RadioButton
13 GroupBox
14 ComboBox
15 ListBox and CheckedListBox
16 NumericUpDown and TrackBar
17 DateTimePicker and MonthCalendar
18 ProgressBar and Timer
19 PictureBox
20 RichTextBox
21 ToolTip and ErrorProvider
22 Properties, tab order and access keys
23 Anchor and Dock
24 Panel and the Controls collection
25 SplitContainer
26 TableLayoutPanel
27 FlowLayoutPanel and AutoSize
28 TabControl
29 Margin, padding, DPI and fonts
30 Delegates and EventHandler
31 Click and the order of mouse events
32 Key events
33 Mouse events
34 Validating and Validated
35 Drag and drop, and the clipboard
36 Unsubscribing and leaks
37 MenuStrip
38 ContextMenuStrip and NotifyIcon
39 ToolStrip and StatusStrip
40 MessageBox
41 OpenFileDialog, SaveFileDialog, FolderBrowserDialog
42 A custom modal dialog
43 Several forms, MDI and settings
44 ListView
45 TreeView
46 DataGridView
47 Formatting, sorting and validation in a grid
48 BindingSource and BindingList
49 INotifyPropertyChanged and binding
50 DataTable, DataSet, CSV and JSON
51 Why logic leaves the form
52 Model-View-Presenter and Passive View
53 A fake view and a driver
54 Validation in the presenter
55 View models
56 Undo and redo
57 Dependencies by hand
58 Localisation and accessibility
59 dotnet format on a WinForms project
60 The UI thread, Invoke and BeginInvoke
61 SynchronizationContext and IProgress
62 Async handlers and the freeze
63 BackgroundWorker and cancellation
64 OnPaint and GDI+
65 Custom controls and hit testing
66 Publish modes
67 Single file, trimming, ClickOnce and signing
68 Migrating from .NET Framework WinForms
69 WinForms and WPF side by side
70 Win32 interop and the pitfalls
71 Capstone A: the document
72 Capstone A: the presenter
73 Capstone A: the form
74 Capstone B: the CSV core
75 Capstone B: the view model
76 Capstone B: the grid form
77 Capstone C: the task and the model
78 Capstone C: the presenter and undo
79 Capstone C: JSON persistence
80 Capstone C: the form, and what we could not run
WinForms course: Start
WinForms course: Controls
WinForms course: Layout
WinForms course: Events
WinForms course: Menus, toolbars and dialogs
WinForms course: Data
WinForms course: Structure and testing
WinForms course: Threads and drawing
WinForms course: Shipping and moving
WinForms course: Capstone A: a notes app
WinForms course: Capstone B: a CSV viewer
WinForms course: Capstone C: a to-do app