Siticone Smart Form
The SiticoneSmartForm is a cutting-edge window class that transforms standard WinForms into intelligent, OS-aware applications.
It seamlessly integrates with the Windows Desktop Window Manager (DWM) to provide native immersive dark mode, Windows 11 Mica/Acrylic backdrops, and dynamic system theme monitoring.
Unlike standard forms, this control acts as a "living" UI component. It listens to Windows Registry events and System Preference changes, automatically updating its color palette (Title Bar, Borders, Background) without any user intervention or application restarts.
Key Capabilities
Features activated immediately upon inheritance.
| Feature | Description |
|---|---|
Auto-Theming Engine |
Automatically detects if Windows is running in Light or Dark mode. It hooks into system events to switch palettes instantly, ensuring your app always looks native. |
Windows 11 Integration |
Unlock exclusive Windows 11 design materials like Mica, Acrylic, and Tabbed Mica backdrops with a single property change. |
Native Title Bar Control |
Gain full control over the standard Windows title bar colors (Background, Text, Border) while keeping native behaviors like Snap Layouts and Shake-to-Minimize. |
Extended Glass Frame |
Support for extending the DWM glass frame into the client area, allowing for sophisticated "headerless" or "glass sheet" UI designs. |
Getting Started
To use SiticoneSmartForm, simply change your form to inherit from this class instead of the standard Form.
using SiticoneNetFrameworkUI;
// Switch inheritance from 'Form' to 'SiticoneSmartForm'
public partial class MainDashboard : SiticoneSmartForm
{
public MainDashboard()
{
InitializeComponent();
// Enable the auto-theming engine
this.SmartFormThemeMode = SiticoneSmartFormThemeMode.Auto;
// Define what "Dark Mode" looks like for your app
this.DarkModeBackColor = Color.FromArgb(32, 32, 32);
this.DarkModeTitleBarColor = Color.FromArgb(32, 32, 32);
// Define what "Light Mode" looks like
this.LightModeBackColor = Color.White;
this.LightModeTitleBarColor = Color.White;
}
}
Theming Engine
The SmartFormThemeMode property dictates how the form reacts to the environment.
| Mode | Behavior |
|---|---|
Auto |
Monitors Windows settings. When the user changes their OS theme, the form swaps between DarkMode* and LightMode* properties instantly. |
Light |
Forces the form into Light Mode configurations, overriding the system preference. |
Dark |
Forces the form into Dark Mode configurations and tells Windows DWM to render the frame in immersive dark mode. |
Custom |
Disables the engine. The form uses the static properties TitleBarColor, BackColor, and BorderColor directly.
|
Windows 11 Visuals
Exclusive materials available on Windows 11 builds (22000+). These properties gracefully degrade on older Windows versions.
public ApplyModernVisuals()
{
// Enable the "Mica" material.
// This allows the desktop wallpaper color to subtly tint the app background.
this.BackdropType = SiticoneBackdropType.Mica;
// Ensure corners are rounded (Windows 11 Standard)
this.RoundedCorners = true;
// Important: Mica requires a transparent background to be visible
this.BackColor = Color.Transparent;
}
Icon Management
The standard WinForms Icon property often renders poorly at different DPI settings in the title bar. SiticoneSmartForm offers enhanced icon controls.
public SetupBranding()
{
// Provide a specific icon resource for the title bar
this.CustomIcon = Properties.Resources.AppLogoHighRes;
// Force the icon to render at a specific size (e.g., 24x24)
// This prevents the blurry upscaling often seen in standard WinForms
this.CustomIconSize = new Size(24, 24);
// Optionally hide the icon entirely for a cleaner look
// this.ShowIconInTitleBar = false;
}
Window Controls
Fine-grained control over the standard window buttons (Minimize, Maximize, Close) directly from properties.
| Property | Type | Description |
|---|---|---|
EnableClose |
bool |
If false, the Close (X) button is disabled visually and ALT+F4 commands are intercepted and ignored.
|
EnableMinimize |
bool | Toggles the Minimize button visibility in the title bar. |
EnableMaximize |
bool | Toggles the Maximize button visibility in the title bar. |
EnableDocking |
bool | If set to false, the form border becomes FixedSingle, preventing the user from resizing the window via edges. |
API Reference
Theming Properties
| Property | Type | Description |
|---|---|---|
SmartFormThemeMode |
Enum | Controls the active mode: Auto, Light, Dark, or Custom. |
TitleBarColor |
Color | Sets the background color of the native title bar (Active in Custom mode). |
TitleBarTextColor |
Color | Sets the caption text color. Use Color.Empty for system default. |
BorderColor |
Color | Sets the color of the DWM window border. |
Advanced Effects
| Property | Type | Description |
|---|---|---|
BackdropType |
Enum | Sets the Windows 11 material: None, Mica, Acrylic, or MicaTabbed. |
EnableBlurBehind |
bool | Activates the DWM blur effect on the window frame (Glass effect). |
ExtendFrameIntoClientArea |
bool | Extends the title bar area into the client content area. |
FrameExtensionMargins |
Padding | Defines the pixel depth of the frame extension (Left, Top, Right, Bottom). |
Example: Custom Branding
Using SiticoneSmartFormThemeMode.Custom allows you to enforce brand colors regardless of system settings.
public ApplyCorporateTheme()
{
// 1. Disable Auto-Theming
this.SmartFormThemeMode = SiticoneSmartFormThemeMode.Custom;
// 2. Define Brand Colors
Color corporateBlue = Color.FromArgb(0, 122, 204);
// 3. Apply to Native Window Elements
this.TitleBarColor = corporateBlue;
this.TitleBarTextColor = Color.White;
this.BorderColor = corporateBlue;
this.BackColor = Color.White;
}