WinForms.FC_UI 4.0.0

dotnet add package WinForms.FC_UI --version 4.0.0
                    
NuGet\Install-Package WinForms.FC_UI -Version 4.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="WinForms.FC_UI" Version="4.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WinForms.FC_UI" Version="4.0.0" />
                    
Directory.Packages.props
<PackageReference Include="WinForms.FC_UI" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add WinForms.FC_UI --version 4.0.0
                    
#r "nuget: WinForms.FC_UI, 4.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package WinForms.FC_UI@4.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=WinForms.FC_UI&version=4.0.0
                    
Install as a Cake Addin
#tool nuget:?package=WinForms.FC_UI&version=4.0.0
                    
Install as a Cake Tool

๐Ÿ‘€ WinForms.FC_UI

A custom WinForms UI control library with rich styling, RGB effects, gradients, lighting, and rounding.

Release NuGet NuGet Downloads Last Commit .NET 10 Windows License


๐Ÿ“‹ Table of Contents


๐Ÿ“– About

WinForms.FC_UI is a custom UI control library for Windows Forms applications. It provides a set of fully customizable controls โ€” buttons, checkboxes, radio buttons, switches, progress bars, scroll bars, text boxes, group boxes, and a color picker โ€” all built with GDI+ custom rendering.

Each control supports fine-grained visual customization including background color, border, gradient fills, lighting/shadow effects, corner rounding, hover and click animations, and an animated RGB color-cycling mode. Controls also work from the keyboard, expose their role and state to screen readers, and render a grayscale look when disabled.

FC_UI Demo


โœจ Features

Characteristic Value
Created 2020
Framework .NET 10 (Windows Forms)
Language C#
Controls 10 custom controls + 1 component
Control Effects RGB Mode Random Style Gradient BG Gradient Border Lighting Rounding Resize
FButton โœ… โœ… โœ… โœ… โœ… โœ… โœ… โœ…
FCheckBox โœ… โœ… โœ… โœ… โœ… โœ… โœ… โœ…
FRadioButton โœ… โœ… โœ… โœ… โœ… โœ… โœ… โœ…
FSwitchBox โœ… โœ… โœ… โœ… โœ… โœ… โœ… โœ…
FProgressBar โœ… โœ… โœ… โœ… โœ… โœ… โœ… โœ…
FScrollBar โœ… โœ… โœ… โœ… โœ… โœ… โœ… โœ…
FRichTextBox โœ… โœ… โœ… โŒยน โœ… โœ… โœ… โœ…
FTextBox โœ… โœ… โœ… โŒยน โœ… โœ… โœ… โœ…
FGroupBox N/A โœ… โœ… โœ… โœ… โœ… โœ… โœ…
ZColorPicker N/A โœ…ยฒ โœ… โœ… โœ… โœ… โœ… โœ…

Effects per control: click ripple and hover overlay (FButton, FCheckBox, FRadioButton), hover overlay and sliding knob (FSwitchBox), smooth value animation (FProgressBar, opt-in via EnableValueAnimation), thumb hover highlight (FScrollBar), focus highlight of the border (FTextBox, FRichTextBox). N/A means not applicable.

ยน The text is edited by a native TextBox/RichTextBox, which cannot draw a transparent or gradient background, so these controls always use the solid BackgroundColor. ยฒ RGB mode animates the border (ShowBorder is off in the default picker style).

Key capabilities:

  • Fine-grained styling: background, border, effects, gradient, lighting, rounding, smoothing mode, font, and more
  • RGB mode: animated HSV color cycling across controls
  • Random style: randomly generates control appearance parameters
  • Click and hover effects: circle ripple, overlays, sliding switch knob, animated progress
  • Gradient fills: linear gradients for background and border
  • Lighting/shadow: blurred shadow effect around controls
  • Corner rounding: percentage-based corner radius for any control
  • Global RGB component: synchronizes RGB animation across all FC_UI controls
  • Standard behavior: keyboard operation, focus cues, screen reader roles, disabled look, AcceptButton/DialogResult support in FButton, grouped FRadioButton selection

๐Ÿš€ Getting Started

๐Ÿ“Œ Prerequisites

  • SDK: .NET 10 SDK 10.0.300 or later
  • Language: C# 14
  • Platform: Windows (WinForms)

The repository includes global.json (SDK 10.0.300 or a later feature band) and packages.lock.json files, so dotnet restore --locked-mode resolves the same dependency graph locally and in CI. After changing a package version in Directory.Packages.props, run a regular dotnet restore once and commit the updated lock files.

๐Ÿ“ฆ Installation

NuGet Package Manager
dotnet add package WinForms.FC_UI

Or via the Package Manager Console in Visual Studio:

Install-Package WinForms.FC_UI

Or add directly to your .csproj:

<PackageReference Include="WinForms.FC_UI" Version="4.0.0" />

๐Ÿ’ก Usage

using FC_UI.Controls;

// Create and configure an FButton
var button = new FButton
{
    ControlStyle = FControlBase.ControlStyleMode.Default,
    DisplayText = "Click me",
    BackgroundColor = Color.FromArgb(37, 52, 68),
    BorderColor = Color.FromArgb(29, 200, 238),
    Rounding = true,
    CornerRadius = 70,
    EnableClickEffect = true,
    ShowBorder = true,
    BorderWidth = 4F
};
this.Controls.Add(button);

// Enable RGB mode
button.Rgb = true;

// Or use the Random style for a surprise
button.ControlStyle = FControlBase.ControlStyleMode.Random;

// Image next to the text; the button works as the form's Enter button
button.Image = Image.FromFile("save.png"); // any Image; the button does not dispose it
button.TextImageRelation = TextImageRelation.ImageBeforeText;
button.DialogResult = DialogResult.OK;
this.AcceptButton = button;

FRadioButton behaves like the standard RadioButton: checking one button unchecks the other AutoCheck buttons in the same container, so put each group in its own FGroupBox or Panel.

To animate all RGB-enabled controls in sync, add an FGlobalRgb component (from the Toolbox or in code):

using FC_UI.Components;

components ??= new System.ComponentModel.Container(); // the form's designer container
var globalRgb = new FGlobalRgb(components) { TimerInterval = 50 };
globalRgb.Status = true;  // controls with Rgb = true now share one hue
globalRgb.Status = false; // they fall back to their own RgbUpdateInterval timers

๐Ÿ‘‰ See the full working demo in examples/WinForms.FC_UI.Example/.


๐Ÿ“š API Reference

Controls

Control Description Notable members
FButton Button with click/hover effects, image, IButtonControl support DisplayText, Image, ImageSize, TextImageRelation, DialogResult, PerformClick()
FCheckBox Checkbox with animated check effect; scales with Height Checked, CheckedChanged, DisplayText, ColorChecked
FRadioButton Radio button with group behavior; scales with Height Checked, AutoCheck, CheckedChanged, SizeChecked, UseGradientFill
FSwitchBox Toggle switch with sliding knob Checked, CheckedChanged, ColorValue, EnableToggleAnimation
FProgressBar Progress indicator with gradient fill and percent text Value, Minimum, Maximum, ProgressText, EnableValueAnimation
FScrollBar Horizontal/vertical scroll bar with draggable thumb Value, ValueChanged, Orientation, SmallStep, LargeStep, ThumbSize
FRichTextBox Rich text editor with styled frame DisplayText, TextChanged, EnableFocusEffect, FocusBorderColor
FTextBox Text input with password masking and styled frame DisplayText, Password, PasswordChar, InnerTextBox, EnableFocusEffect
FGroupBox Container with styled frame and optional caption DisplayText
ZColorPicker HSV color wheel with brightness slider, preview and RGB/HEX text SelectedColor, ColorChanged, ShowColorInfo, InfoTextColor, MarkerColor

Every control also exposes ControlStyle (Default, Custom, Random).

Common Properties

Shared by all controls (they derive from FControlBase):

Property Type Description
ShowBackground bool Enable/disable background fill
BackgroundColor Color Background color
Rounding bool Enable/disable corner rounding
CornerRadius int Rounding percentage (0โ€“100)
Rgb bool Enable/disable RGB color cycling mode
RgbUpdateInterval int RGB animation timer interval in milliseconds (used while FGlobalRgb is off)
ShowBorder bool Enable/disable border
BorderWidth float Border width
BorderColor Color Border color
Lighting bool Enable/disable lighting/shadow effect
LightingColor Color Lighting/shadow color
LightingAlpha int Maximum lighting alpha (0โ€“255)
LightingWidth int Lighting/shadow width
UseGradientBackground bool Enable/disable background gradient (GradientColor1, GradientColor2)
UseGradientBorder bool Enable/disable border gradient (GradientBorderColor1, GradientBorderColor2)
SmoothingMode SmoothingMode Graphics smoothing mode
TextRenderingHint TextRenderingHint Text rendering quality

Components

Component Description
FGlobalRgb Enables synchronized global RGB mode for all FC_UI controls (Status, TimerInterval)

Custom controls

FControlBase can be subclassed: override PaintControl(Graphics) to draw (disabled controls are rendered through a grayscale filter automatically), UpdateGeometry() to recalculate layout after size, border, or lighting changes, and DefaultAccessibleRole/AccessibleText/AccessibleStateFlags to describe the control to screen readers. PrepareGeometry, DrawBorder, ClipToContent, FillBackground, and DrawFocusCue provide the shared rendering steps.


โŒจ๏ธ Keyboard and Accessibility

Control Keyboard
FButton Space or Enter clicks the focused button; Enter elsewhere clicks the form's AcceptButton
FCheckBox, FSwitchBox Space toggles
FRadioButton Space selects; arrow keys move the selection within the group
FScrollBar Arrow keys (SmallStep), Page Up/Down (LargeStep), Home/End; mouse wheel
ZColorPicker Left/Right change the hue, Up/Down change the brightness
FProgressBar, FGroupBox Not focusable (skipped by Tab)

Focused controls draw a dotted focus cue when Windows shows keyboard cues. Each control reports an accessibility role (push button, check button, radio button, progress bar, scroll bar, grouping), its text as the accessible name, and its checked state or value; AccessibleName and AccessibleRole override the defaults.


๐Ÿ”„ Upgrading from 3.1.x to 4.0.0

Behavior that changed in 4.0.0 and may affect existing code:

  • Standard events are now raised: SizeChanged, Resize, Paint, MouseEnter/MouseLeave/MouseDown/MouseMove/MouseUp/MouseClick. Docked and anchored children of FGroupBox follow its size.
  • Property setters repaint asynchronously (Invalidate), so several changes produce one repaint. FProgressBar.Value (unless EnableValueAnimation is on) and FScrollBar.Value still repaint immediately.
  • New effect properties are not in existing designer files, so their Default style values apply after upgrading: hover overlay and sliding knob in FSwitchBox, thumb hover in FScrollBar, focus highlight in FTextBox/FRichTextBox. Turn them off with EnableHoverEffect, EnableToggleAnimation, or EnableFocusEffect.
  • The inner text field of FTextBox/FRichTextBox uses ForeColor instead of a fixed WhiteSmoke (the default ForeColor is the same color).
  • FRadioButton: clicking a checked button no longer unchecks it, and checking a button unchecks the other AutoCheck buttons in the same container. Set AutoCheck = false to manage Checked yourself.
  • FCheckBox/FRadioButton no longer force a 45 px height; the box, check mark, and effects scale with Height. The 45 px layout is unchanged.
  • ZColorPicker derives from FControlBase and no longer contains PictureBox/Label children. SelectedColor can be set from code (it moves the markers), and ColorChanged is raised only when the color actually changes.
  • FScrollBar implements ISupportInitialize; the WinForms designer adds BeginInit/EndInit the next time the form is saved, which keeps the serialized Size and CornerRadius of horizontal bars.
  • Disabled controls (Enabled = false) are drawn in grayscale.
  • FProgressBar and FGroupBox are no longer Tab stops, like the standard ProgressBar and GroupBox.
  • Two quick clicks on FButton raise two Click events (as with Button) instead of Click and DoubleClick.

๐Ÿงช Running Tests

dotnet restore WinForms.FC_UI.slnx --locked-mode
dotnet build WinForms.FC_UI.slnx --no-restore --configuration Release
dotnet test WinForms.FC_UI.slnx --no-build --configuration Release --verbosity normal

Tests are located in tests/WinForms.FC_UI.Tests/ and use xUnit. They cover engine utilities (HSV/RGB conversion, rounded rectangle generation, random helpers), control property validation (defaults, bounds checking, events), keyboard, mouse, and accessibility behavior, animations, layout, and render checks.

To run the demo application:

dotnet run --project examples/WinForms.FC_UI.Example

๐Ÿ—๏ธ Project Structure

WinForms.FC_UI/
โ”œโ”€โ”€ ๐Ÿ“ src/
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ Components/
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“„ FGlobalRgb.cs              # Global RGB component
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ Controls/
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ FControlBase.cs            # Shared base class for FC_UI controls
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ FButton.cs                 # Button control
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ FCheckBox.cs               # CheckBox control
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ FRadioButton.cs            # RadioButton control
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ FSwitchBox.cs              # SwitchBox control
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ FProgressBar.cs            # ProgressBar control
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ FScrollBar.cs              # ScrollBar control
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ FRichTextBox.cs            # RichTextBox control
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ FTextBox.cs                # TextBox control
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ FGroupBox.cs               # GroupBox control
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“„ ZColorPicker.cs            # Color picker control
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ Engines/
โ”‚   โ”‚   โ”œโ”€โ”€ ๐Ÿ“„ DrawEngine.cs              # Drawing utilities (rounded rects, HSV, shadow)
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“„ HelpEngine.cs              # Helper utilities (fonts, graphics, random)
โ”‚   โ””โ”€โ”€ ๐Ÿ“„ WinForms.FC_UI.csproj
โ”œโ”€โ”€ ๐Ÿ“ tests/
โ”‚   โ””โ”€โ”€ ๐Ÿ“ WinForms.FC_UI.Tests/          # xUnit tests
โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ DrawEngineTests.cs
โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ HelpEngineTests.cs
โ”‚       โ”œโ”€โ”€ ๐Ÿ“ Controls/                   # Control tests
โ”‚       โ”œโ”€โ”€ ๐Ÿ“ Components/                 # Component tests
โ”‚       โ””โ”€โ”€ ๐Ÿ“„ WinForms.FC_UI.Tests.csproj
โ”œโ”€โ”€ ๐Ÿ“ examples/
โ”‚   โ””โ”€โ”€ ๐Ÿ“ WinForms.FC_UI.Example/        # Demo application
โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ Demo.cs                    # Demo form
โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ Program.cs
โ”‚       โ””โ”€โ”€ ๐Ÿ“„ WinForms.FC_UI.Example.csproj
โ”œโ”€โ”€ ๐Ÿ“ resources/                           # Logo, demo GIFs
โ”œโ”€โ”€ ๐Ÿ“„ Directory.Build.props                # Shared build settings
โ”œโ”€โ”€ ๐Ÿ“„ Directory.Packages.props             # Central package management
โ”œโ”€โ”€ ๐Ÿ“„ global.json                          # .NET SDK version
โ”œโ”€โ”€ ๐Ÿ“„ WinForms.FC_UI.slnx                 # Solution file
โ”œโ”€โ”€ ๐Ÿ“„ LICENSE
โ””โ”€โ”€ ๐Ÿ“„ README.md

๐Ÿ”Ž Demos

Default Style

Hover and click effects, checkbox animation, scroll bar driving the progress bar, color picking, and keyboard focus cues.

Default Style

RGB Mode (FGlobalRgb component)

All controls with Rgb = true cycling through one shared hue.

RGB Mode

Random Style

ControlStyle = Random applied to every control several times.

Random Style


๐Ÿค Contributing

Contributions are welcome! To get started:

  1. ๐Ÿด Fork the repository
  2. ๐ŸŒฟ Create a feature branch (git checkout -b feature/my-feature)
  3. โœ๏ธ Make your changes and add tests
  4. โœ… Run dotnet test to verify everything passes
  5. ๐Ÿ“ฌ Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License.

Product Compatible and additional computed target framework versions.
.NET net10.0-windows7.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0-windows7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.0 176 9/28/2026
3.1.5 178 5/31/2026
3.1.3 172 3/27/2026