Material3.WinForms 0.3.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Material3.WinForms --version 0.3.0
                    
NuGet\Install-Package Material3.WinForms -Version 0.3.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="Material3.WinForms" Version="0.3.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Material3.WinForms" Version="0.3.0" />
                    
Directory.Packages.props
<PackageReference Include="Material3.WinForms" />
                    
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 Material3.WinForms --version 0.3.0
                    
#r "nuget: Material3.WinForms, 0.3.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 Material3.WinForms@0.3.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=Material3.WinForms&version=0.3.0
                    
Install as a Cake Addin
#tool nuget:?package=Material3.WinForms&version=0.3.0
                    
Install as a Cake Tool

Material3.WinForms

Material 3 (Material You) for Windows Forms — design tokens and owner-drawn controls with dynamic color from a seed, light/dark themes with runtime switching, the full M3 type scale, elevation, state layers and motion tokens.

Existing "Material for WinForms" libraries implement Material 2 and are largely unmaintained. This project targets the current spec: HCT tonal palettes, color roles, surface containers and the 2023+ component look.

Status: preview (0.3). Foundation and the core component catalog are complete.

Features

  • Dynamic color — full light + dark ColorScheme generated from one seed color through a C# port of the HCT/CAM16 pipeline (no native dependencies). Three variants: TonalSpot (M3 default), Neutral (near-monochrome), Vibrant.
  • Runtime theme switchingThemeManager.IsDark = false repaints every subscribed control; no restart, no per-control wiring.
  • Color roles — all M3 roles including the six surface containers, inverse roles, outline pair, plus shared Success/Warning extensions.
  • Type scale — all 15 styles (Display → Label) on Segoe UI with letter-spacing and line-height metadata GDI fonts can't carry.
  • Elevation 0–5 — painted soft shadows (WinForms has no compositor) + per-level surface tint.
  • State layers — spec opacities for hover / focus / pressed / dragged, used consistently by every control.
  • Motion tokens — M3 duration scale and cubic-bezier easings (standard + emphasized) evaluated exactly like CSS timing functions.
  • Material Symbols — 30+ icons embedded as SVG, rasterized with caching and tinted to any role color.

Controls

Family Included
Actions MaterialButton (5 variants), MaterialIconButton (4 styles + toggle), MaterialFab (small / standard / large / extended), MaterialSegmentedButton
Text inputs MaterialTextField (filled + outlined, floating label, error state, icons), MaterialSearchBar
Selection MaterialSwitch, MaterialCheckBox (incl. indeterminate), MaterialRadioButton, MaterialChip (assist / filter / input / suggestion), MaterialSlider, MaterialOptionCard, DropdownSelect
Navigation MaterialTabs (primary / secondary), MaterialNavigationBar, MaterialNavigationRail, MaterialNavigationDrawer
Communication MaterialProgressBar (linear), MaterialCircularProgress (determinate + indeterminate), MaterialSnackbar, MaterialBadge, MaterialTooltip (plain + rich), SkeletonCard, StepChecklist
Containment MaterialCard (elevated / filled / outlined), MaterialListItem, MaterialDivider, RoundedPanel, MaterialScrollPanel (overlay scrollbar), MaterialMenu
Dialogs MaterialDialog, MaterialMessageBox (themed info / error / confirm), MaterialDatePickerDialog (calendar grid), MaterialTimePickerDialog (time input)
Window BorderlessForm (native resize/snap without chrome), MaterialTitleBar, WindowChrome (DWM caption theming), FormDragAnywhere, TaskbarProgress, FormAnimation
Text SoftLabel (consistent GDI+ rendering)

Quickstart

using Material3.WinForms.Theming;

[STAThread]
static void Main() {
    Application.EnableVisualStyles();

    // One line of theming: every Material control follows this scheme.
    ThemeManager.Apply(MaterialTheme.FromSeed(Color.FromArgb(0x67, 0x50, 0xA4)), isDark: true);

    Application.Run(new MainForm());
}
// Switch mode at runtime — all controls repaint themselves.
ThemeManager.IsDark = !ThemeManager.IsDark;

// Or swap the whole palette.
ThemeManager.Theme = MaterialTheme.FromSeed(Color.SeaGreen, SchemeVariant.Vibrant);
var save = new MaterialButton {
    Text = "Save",
    Variant = MaterialButtonVariant.Filled,
    IconGlyph = MaterialIcons.Check,
};

Custom drawing uses the same tokens the stock controls do:

using Material3.WinForms.Theming;   // MaterialColors — current scheme roles
using Material3.WinForms.Tokens;    // Shape, Spacing, StateLayers, Motion, Elevation
using Material3.WinForms.Typography; // MaterialType — the 15-style type scale

samples/Material3.Gallery is a live component catalog: every color role, the full type scale, elevation levels, all button variants and every control in both modes. Run it to smoke-test changes or to grab screenshots.

dotnet build Material3.WinForms.sln
samples\Material3.Gallery\bin\Debug\net472\Material3.Gallery.exe

High-DPI

The controls scale their owner-drawn geometry to the monitor DPI (via Control.DeviceDpi), so they stay crisp at 125/150/200%. DPI awareness is a process-level setting that the host application must opt into — a referenced DLL cannot set it. In your app:

  • declare awareness in your app.manifest (<dpiAware>true</dpiAware>), and on .NET Framework also add an app.config <System.Windows.Forms.ApplicationConfigurationSection> with <add key="DpiAwareness" value="System" /> — the manifest alone makes the process aware but does not enable WinForms' Control.DeviceDpi, so without this section the controls can't scale (on .NET 8 use Application.SetHighDpiMode(...) instead), and
  • set AutoScaleMode = AutoScaleMode.Dpi on your forms.

That's all — the Material controls then render crisply with no extra code. See samples/Material3.Gallery/app.manifest and App.config for a working example. If you do your own owner-drawing with the shared tokens, Material3.WinForms.Dpi.Scale(control, px) is the same helper the controls use.

Requirements

  • .NET Framework 4.7.2+ or .NET 8 (net8.0-windows)
  • Windows 10+ recommended (DWM caption theming and rounded corners degrade gracefully on older builds)

Acknowledgements

The HCT color pipeline is a C# port of Google's material-color-utilities (Apache 2.0). Icons are Material Symbols (Apache 2.0).

License

MIT © dary1337

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed. 
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7.2

    • No dependencies.
  • net8.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
0.6.0 92 6/10/2026
0.5.0 96 6/8/2026
0.4.0 96 6/8/2026
0.3.0 104 6/7/2026