Skip to content

0xLaileb/WinForms.FC_UI

Repository files navigation

FC_UI Logo

WinForms.FC_UI

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

Release Downloads Last Commit .NET 10 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, click animations, and an animated RGB color-cycling mode.

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 โŒ โœ… โœ… โœ… โœ… โœ… โœ… โœ…
ZColorPicker โŒ โŒ โŒ โœ… โŒ โŒ โœ… โŒ

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 effects โ€” circle ripple and white overlay animations (FButton, FCheckBox, FRadioButton)
  • 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

๐Ÿš€ Getting Started

๐Ÿ“Œ Prerequisites

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

๐Ÿ“ฆ Installation

Clone the repository and add a project reference:

<ProjectReference Include="path\to\src\WinForms.FC_UI.csproj" />

๐Ÿ’ก Usage

using FC_UI.Controls;

// Create and configure an FButton
var button = new FButton
{
    FButtonStyle = FButton.Style.Default,
    TextButton = "Click me",
    ColorBackground = Color.FromArgb(37, 52, 68),
    ColorBackground_Pen = Color.FromArgb(29, 200, 238),
    Rounding = true,
    RoundingInt = 70,
    Effect_1 = true,
    BackgroundPen = true,
    Background_WidthPen = 4F
};
this.Controls.Add(button);

// Enable RGB mode
button.RGB = true;

// Or use the Random style for a surprise
button.FButtonStyle = FButton.Style.Random;

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


๐Ÿ“š API Reference

Controls

Control Description
FButton Customizable button with click effects, gradients, lighting, and RGB mode
FCheckBox Checkbox with circle animation effects and gradient support
FRadioButton Radio button with customizable checked indicator and effects
FSwitchBox Toggle switch with smooth visual feedback
FProgressBar Progress indicator with gradient fill and text overlay
FScrollBar Horizontal/vertical scrollbar with thumb customization
FRichTextBox Rich text editor with styled border and lighting
FTextBox Text input with password masking and styled border
FGroupBox Container with styled frame and gradient background
ZColorPicker HSV color wheel picker with brightness slider

Common Properties

Property Type Description
Background bool Enable/disable background fill
ColorBackground Color Background color
Rounding bool Enable/disable corner rounding
RoundingInt int Rounding percentage (0โ€“100)
RGB bool Enable/disable RGB color cycling mode
BackgroundPen bool Enable/disable border
Background_WidthPen float Border width
ColorBackground_Pen Color Border color
Lighting bool Enable/disable lighting/shadow effect
ColorLighting Color Lighting/shadow color
LinearGradient_Background bool Enable/disable background gradient
LinearGradientPen bool Enable/disable border gradient
SmoothingMode SmoothingMode Graphics smoothing mode
TextRenderingHint TextRenderingHint Text rendering quality

Components

Component Description
FGlobal_RGB Enables synchronized global RGB mode for all FC_UI controls

๐Ÿงช Running Tests

dotnet test

Tests are located in tests/WinForms.FC_UI.Tests/ and use xUnit. They cover engine utilities (HSV-to-RGB conversion, rounded rectangle generation, random helpers), and control property validation (defaults, bounds checking, events).


๐Ÿ—๏ธ Project Structure

WinForms.FC_UI/
โ”œโ”€โ”€ ๐Ÿ“ src/
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ Components/
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“„ FGlobal_RGB.cs             # Global RGB component
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ 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
โ”‚       โ”œโ”€โ”€ ๐Ÿ“„ Program.cs
โ”‚       โ””โ”€โ”€ ๐Ÿ“„ WinForms.FC_UI.Example.csproj
โ”œโ”€โ”€ ๐Ÿ“ resources/                           # Logo, demo GIFs
โ”œโ”€โ”€ ๐Ÿ“„ Directory.Build.props                # Shared build settings
โ”œโ”€โ”€ ๐Ÿ“„ Directory.Packages.props             # Central package management
โ”œโ”€โ”€ ๐Ÿ“„ WinForms.FC_UI.slnx                 # Solution file
โ”œโ”€โ”€ ๐Ÿ“„ LICENSE
โ””โ”€โ”€ ๐Ÿ“„ README.md

๐Ÿ”Ž Demos

Default Style

Default Style

RGB Mode (Global_RGB component)

RGB Mode

Random Style

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

๐Ÿ”ฎ Roadmap

Things to add or fix in future releases:

  1. FButton โ€” Add image/icon support so a picture can be placed inside the button.
  2. ZColorPicker โ€” Finish refactoring to remove the internal PictureBox dependency.

๐Ÿ“„ License

This project is licensed under the MIT License.

๐Ÿ“– Star History

Star History Chart

Contributors

Languages