C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
C# Windows Forms Controls
Use Windows Forms controls, selecting from the types in the System.Windows.Forms namespace.
Controls. Windows Forms programs have high-quality user experiences. They are native Windows applications. We gain buttons, text boxes, tabs.
A list. Here is a list of controls. With these controls, we assemble programs from prebuilt components. Each page has screenshots and C# code examples.BackgroundWorkerButtonChartCheckBoxCheckedListBoxColorDialogComboBoxContextMenuStripDataGridViewDateTimePickerDomainUpDownDropDownItemsErrorProviderEventLogFileSystemWatcherFlowLayoutPanelFolderBrowserDialogFontDialogGroupBoxHelpProviderImageListLabelLinkLabelListBoxListViewMaskedTextBoxMenuStripMonthCalendarNotifyIconNumericUpDownOpenFileDialogPanelPictureBoxProgressBarPropertyGridRadioButtonRichTextBoxSaveFileDialogSplitContainerStatusStripTabControlTableLayoutPanelTextBoxToolStripContainerToolTipTrackBarTreeViewWebBrowser
DataGridView, details. The DataGridView is an important control. Many programs are built around data. We can enable sorting and scrolling through data.DataGridView: TutorialDataGridView: Add RowsDataGridView: Alternating ColorsDataGridView: Columns
Properties. There are also many properties we can change on controls (and forms) in Windows Forms. We cover aspects of properties in this platform.DataSourceFocusedForeColor, BackColorTagText
Events. Windows Forms is event-driven. We can trigger behaviors in controls when another action happens, such as when the user clicks the mouse.KeyCodePreviewKeyDownTextChanged
Methods. Many methods are available in Windows Forms. Most are clear and need no explanation. But we touch on specific methods in some detail.InitializeComponentMessageBoxMessageBox.Show: DialogResultTextBox.AppendText
Custom. When using Windows Forms, sometimes we cannot use a built-in solution to a specific problem. We describe some customized solutions.Customized Dialog BoxPosition WindowsSingle Instance
LINQ. We can use LINQ extensions to search controls. Queries and extension methods (like OfType) are helpful. They can reduce code bloat.LINQ: Query Forms
A summary. Web-based user interfaces are now prevalent. But Windows programs hold their place. These programs do not rely on network connectivity. They may be more reliable.
© TheDeveloperBlog.com