AssortedDevelopment.StylableWinFormsControls
0.2.0-beta.2
See the version list below for details.
dotnet add package AssortedDevelopment.StylableWinFormsControls --version 0.2.0-beta.2
NuGet\Install-Package AssortedDevelopment.StylableWinFormsControls -Version 0.2.0-beta.2
<PackageReference Include="AssortedDevelopment.StylableWinFormsControls" Version="0.2.0-beta.2" />
<PackageVersion Include="AssortedDevelopment.StylableWinFormsControls" Version="0.2.0-beta.2" />
<PackageReference Include="AssortedDevelopment.StylableWinFormsControls" />
paket add AssortedDevelopment.StylableWinFormsControls --version 0.2.0-beta.2
#r "nuget: AssortedDevelopment.StylableWinFormsControls, 0.2.0-beta.2"
#:package AssortedDevelopment.StylableWinFormsControls@0.2.0-beta.2
#addin nuget:?package=AssortedDevelopment.StylableWinFormsControls&version=0.2.0-beta.2&prerelease
#tool nuget:?package=AssortedDevelopment.StylableWinFormsControls&version=0.2.0-beta.2&prerelease
winforms-stylable-controls
This project contains custom WinForms controls that support more styling options than the default ones. We use this project for better dark mode and theme support.
(For themes, check out our other project winforms-themes).
License
ToC
Usage
To use this project, just add a reference to our nuget package (dotnet add package AssortedDevelopment.StylableWinFormsControls) and replace the standard controls with our custom controls. All the controls can be found in the namespace StylableWinFormsControls.
Controls
This is the currently available list of custom controls and their extended features and known characteristics compared to the original WInForms controls.
Button ⇒ StylableButton
Exposes the following additional properties:
Color EnabledHoverColor: Gets/Sets the background color while the mouse is over the enabled Button.Color EnabledBackColor: Gets/Sets the background color of an enabled Button.Color DisabledBackColor: Gets/Sets the background color of a disabled Button.Color EnabledForeColor: Gets/Sets the foreground color of an enabled Button.Color DisabledForeColor: Gets/Sets the foreground color of a disabled Button.Color BorderColor: Gets/sets the border color in any of the scenarios described above.
CheckBox ⇒ StylableCheckBox
Exposes the following additional properties:
Color DisabledForeColor: Gets/Sets the foreground color if the checkbox is disabled.
Has the following additional characteristics:
- Does not support AutoSize at the moment
ComboBox ⇒ StylableComboBox
Exposes the following additional properties:
Color BorderColor: Sets the color of the border around the combobox (not the item list box)Color ItemHoverColor: Sets the background color of the item in the list that's currently hovered/selected.
DataGridView ⇒ StylableDataGridView
Exposes the following additional properties:
bool DoubleBuffered: Exposes the underlyingControl.DoubleBufferedto enable/disable double-buffering on theDataGridViewcontrolbool EnableFirstColumnGrouping: Gets/sets a value indicating whether multiple occurences of the same text in multiple rows of the first column should all be hidden except for the first one.
DateTimePicker ⇒ StylableDateTimePicker
Exposes the following additional properties:
Color EnabledBackColor: Gets/Sets the background color of an enabled DateTimePicker.Color DisabledBackColor: Gets/Sets the background color of a disabled DateTimePicker.Color EnabledForeColor: Gets/Sets the foreground color of an enabled DateTimePicker.Color DisabledForeColor: Gets/Sets the foreground color of a disabled DateTimePicker.
Has the following additional characteristics:
- The control behavior via keyboard is currently unreliable (see #24)
- The
BackColorproperty is additionally accessable via Designer
Label ⇒ StylableLabel
Exposes the following additional properties:
Color DisabledForeColor: Gets/Sets the foreground color of a disabled Label.
Has the following additional characteristics:
- Does not currently support AutoEllipsis on disabled labels
ListView ⇒ StylableListView
Exposes the following additional properties:
Color GroupHeaderBackColor: Sets the color that builds the background of any group header row.Color GroupHeaderForeColor: Sets the foreground color of any group header row.Color SelectedItemBackColor: Sets the color that builds the background of selected item rows.Color SelectedItemForeColor: Sets the foreground color of any selected item row.
Has the following additional characteristics:
- DoubleBuffering is forced to be enabled for technical reasons
TabControl ⇒ StylableTabControl
Exposes the following additional properties:
Color BackgroundColor: Sets the background color of the entire TabControl.Color ActiveTabBackgroundColor: Gets/sets the background color of the currently active tab rectangle.Color ActiveTabForegroundColor: Gets/sets the foreground color of the currently active tab rectangle.Color BorderColor: Sets color of the border in the TabControl itself and around the tabsbool UseRoundedCorners: Gets or sets a value indicating whether tab page controls have a corner radius or not.Bitmap[] UpDownImages: Gets or sets the currently used images for the UpDown control. [0] = Left, [1] = Right, [2] = Left (disabled), [3] = Right (disabled)
Has the following additional characteristics:
- Only supports
AlignmentvaluesTopandBottom Multilineis currently not supported
TextBox ⇒ StylableTextBox
Exposes the following additional properties:
Color BorderColor: Gets/Sets the color of the border around the TextBoxColor HintForeColor: Gets/Sets the foreground color of the hint textColor TextForeColor: Gets/Sets the foreground color of non-hint textstring Hint: Gets/Sets the value to be shown if no user-provided text or default text is shownbool IsHintActive: Gets a value indicating whether the text currently shows a hint text or not.bool IsDelayActive: Gets/Sets a value indicating whether theTextChangedevent is to be triggered only after a specified amount of time.DelayedTextChangedTimeout: Gets/Sets the delay time for triggering theTextChangedevent after the last user input
Has the following additional characteristics:
- Supports providing hints to be shown when the control does not have focus and the value is empty.
- Supports delaying
TextChangedevents
Contributions
Please view the contributing guide for more information.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0-windows7.0 is compatible. net7.0-windows was computed. net8.0-windows was computed. net9.0-windows was computed. net10.0-windows was computed. |
-
net6.0-windows7.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on AssortedDevelopment.StylableWinFormsControls:
| Package | Downloads |
|---|---|
|
AssortedDevelopment.WinFormsThemes
WinForms Themes provides styling and theming options for WinForms projects. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.0-beta.5 | 168 | 2/27/2024 |
| 0.2.0-beta.4 | 99 | 2/25/2024 |
| 0.2.0-beta.3 | 87 | 2/25/2024 |
| 0.2.0-beta.2 | 143 | 8/12/2023 |
| 0.2.0-beta.1 | 131 | 8/12/2023 |
| 0.1.0 | 461 | 7/23/2023 |