Architrave Constitution — Native Windows App Synthesis (Fluent 2 · WinUI 3 / Windows App SDK · WPF .NET)
The non‑negotiable rule‑base for any Architrave lane that designs, reviews, reverse‑engineers, or generates a native Windows desktop app. Its single purpose: let Architrave build native apps in XAML + C# (WinUI 3 / Windows App SDK first; WPF on .NET second) that are indistinguishable from first‑party Microsoft engineering — grounding every decision in official Microsoft documentation (Fluent 2, the Windows 11 design guidance on Microsoft Learn, and the WinUI / Windows App SDK reference) and reusing system components instead of guessing, approximating, or reinventing them.
This document is Windows‑only (WinUI 3 / Windows App SDK and WPF; the same Fluent language extends to
Fluent React on the web). Apple / SwiftUI guidance lives in constitution-apple.md and is out of
scope here. Fluent 2 is the source of truth; community blog posts, Metro/Windows‑8 patterns, and the
legacy Microsoft Design Language 2 (MDL2) are not, except as explicit migration targets.
- Ground in ground truth. Every structural, typographic, color, material, layering, iconography, and
accessibility decision must trace to a primary Microsoft source: the Fluent 2 design system
(
fluent2.microsoft.design), the Windows apps design guidance on Microsoft Learn (learn.microsoft.com/windows/apps/design), the WinUI / Windows App SDK API reference, Segoe Fluent Icons, the Windows design toolkit / Figma kits, and Microsoft Build engineering sessions. Cite the source for any non‑trivial call. - Reuse, don't reinvent. If a native system control, style, or backdrop satisfies the requirement, use it. A custom/templated control is a last resort that must be justified against the WinUI control it replaces.
- No guessing. If a spec (a ramp size, a token/brush key, a control name, a backdrop API, a corner radius) is uncertain, verify it against the live Fluent 2 / Microsoft Learn / WinUI docs before emitting code — do not approximate from memory or from community samples. Models are frequently trained on outdated or low‑quality XAML; treat internal recall as a hypothesis to confirm, never as authority.
- Modern over legacy. Target the current system — Fluent 2, WinUI 3 / Windows App SDK, and .NET 9 (WPF Fluent theme). Treat UWP/WinUI 2, MDL2 / Metro, hard‑coded backgrounds behind Mica, and WinForms paradigms as migration targets, not patterns to reproduce.
- Let the system do the work. Standard WinUI controls automatically pick up the current type ramp, theme brushes, corner radii, Mica/Acrylic, Light/Dark/High‑Contrast, and accessibility behavior. The most native code is usually the code you don't write — reference theme resources, not literals.
- Hard‑coding font sizes (
FontSize="17") for body/UI text — use the Windows type rampStyles (BodyTextBlockStyle,TitleTextBlockStyle, …). - Hard‑coding color hex values — use theme brushes via
{ThemeResource …}(XAML) /SystemColorsDynamicResource(WPF). - Hard‑coding
Width/Heightfor layout — useGridwith*/Auto,StackPanel, and alignment; reserveCanvasfor true overlap only. - Painting custom backgrounds behind Mica (it fights the desktop tint and active/inactive focus), or stacking materials (Acrylic on Mica on Acrylic).
- MDL2 Assets / Metro chrome, UWP
ToastNotificationManager, orBinaryFormatter(removed in .NET 9) when a modern equivalent exists. - Bold or Italic for emphasis, or ALL‑CAPS titles — the ramp uses Semibold for emphasis and sentence case everywhere.
- Inventing a parallel spacing / type / corner scale when Fluent already defines one (4 epx grid; 12/16‑style ramp; 4/8 px corners).
System family. Segoe UI Variable is the Windows 11 UI font — a variable font with two axes:
weight (wght, Thin 100 → Bold 700) and optical size (opsz, automatic, optimizing counters for
legibility from 8 pt to 36 pt). In XAML common controls it is selected by default for supported
languages and optical sizing matches the requested size automatically. Named weights: Light 300 ·
Semilight 350 · Regular 400 · Semibold 600 · Bold 700. For non‑Latin scripts use the documented
per‑language UI fonts (Yu Gothic UI, Malgun Gothic, Microsoft YaHei/JhengHei UI, Nirmala UI, …).
Rule: drive all text from the named type ramp, never raw sizes. Sizes are in effective pixels (epx) — a density‑independent unit that scales across DPI and viewing distance, so you design once.
Windows 11 type ramp (Microsoft Learn Typography; size/line‑height in epx):
| Ramp style | Weight | Size / line‑height (epx) | XAML Style resource |
|---|---|---|---|
| Caption | Regular (Small) | 12 / 16 | CaptionTextBlockStyle |
| Body | Regular | 14 / 20 | BodyTextBlockStyle |
| Body Strong | Semibold | 14 / 20 | BodyStrongTextBlockStyle |
| Body Large | Regular | 18 / 24 | (ramp step — size manually) |
| Subtitle | Semibold | 20 / 28 | SubtitleTextBlockStyle |
| Title | Semibold | 28 / 36 | TitleTextBlockStyle |
| Title Large | Semibold | 40 / 52 | TitleLargeTextBlockStyle |
| Display | Semibold | 68 / 92 | DisplayTextBlockStyle |
Apply via Style="{StaticResource TitleTextBlockStyle}" — never a raw FontSize. These resources follow
the XAML type‑ramp conventions and ship with WinUI.
Best practices (verbatim from the docs). Use Regular for most text and Semibold for titles and emphasis. Sentence case for all UI text, including titles — not Title Case, not ALL‑CAPS. Bold and Italic are not in the ramp: use Semibold for emphasis; Italic is excluded because it reduces legibility (notably for dyslexia). Minimum legible sizes: 14 px Semibold / 12 px Regular. Default left‑aligned (ragged right); center only in rare cases (e.g. a label under an icon). Keep 50–60 characters per line; truncate with ellipses (clip only in rare cases).
⚠️ Correction vs. Apple/web cheat‑sheets: Windows measures UI text in epx, not points; it uses sentence case (Apple uses title‑style headers; never bring ALL‑CAPS section headers here); and it emphasizes with Semibold, never Bold/Italic. Do not transplant an iOS/macOS or Material type scale.
- Two color modes/themes — light and dark — plus High Contrast, all first‑class. Each mode is a set of neutral values auto‑adjusted for optimal contrast: darker surfaces read as background/less important; lighter/brighter surfaces are highlighted/important (see §1.4 layering). Every surface must resolve correctly in light + dark + High Contrast.
- Reference theme brushes, never hex. In XAML consume them as
{ThemeResource …}(e.g.TextFillColorPrimaryBrush,LayerFillColorDefaultBrush,CardBackgroundFillColorDefaultBrush,AccentFillColorDefaultBrush); they swap automatically across the three themes. In WPF referenceSystemColors.*KeyviaDynamicResourceso the app reacts to OS personalization. - Accent color emphasizes important elements and signals interactive state. Its values are
generated automatically and optimized for contrast in both modes — reference the accent brush
family (
AccentFillColorDefault+ the systemLight1/Light2/Light3andDark1/Dark2/Dark3variants; WPFAccentColorBrushKey+Light1/2/3,Dark1/2/3). Use accent sparingly — to highlight, not to wash a whole surface. - Color principles (docs): use color meaningfully; use one color to indicate interactivity; color is personal (honor the user's chosen accent + theme); color is cultural (meanings differ by region).
- Never rely on color alone to convey state/meaning — pair it with an icon, glyph, shape, or label. Design for color‑blindness (≈8 % of men are red‑green color‑blind) and ambient lighting.
Windows uses materials to tie surfaces to their environment and distinguish focused from unfocused apps. Two families: occluding (Mica, Acrylic — base layers beneath interactive controls) and transparent (Smoke — highlights immersive surfaces).
- Mica — an opaque material subtly tinted with the user's desktop background color; the base
layer for long‑lived window backgrounds (low‑energy, sampled once). Mode‑aware and it indicates
window focus with built‑in active/inactive states — so never paint a custom window background that
defeats it. Mica Alt (
Kind="BaseAlt") is the deeper‑tinted variant for tabbed title‑bar experiences. - Acrylic — a semi‑transparent, frosted‑glass material (in Windows 11 brighter and more translucent). Use only for transient, light‑dismiss surfaces: flyouts, menus, context menus, tooltips. Mode‑aware. Do not use Acrylic for a long‑lived window body (that's Mica's job).
- Smoke — a transparent dimming layer that recedes the surfaces beneath a modal (e.g. a
ContentDialog) to signal blocked interaction. Not mode‑aware — always translucent black.
Layer economy: one base material per window; never stack materials. Apply backdrops with the platform API (§4), not hand‑rolled blur.
Windows 11 expresses hierarchy with a two‑layer system plus elevation (shadow + contour):
- Base layer — the app's foundation: window background (Mica), app menus, commanding, and
navigation. Content layer — the central experience, either one contiguous surface or segmented
into cards (
CardBackgroundFillColorDefaultBrush, layered atop the base viaLayerFillColorDefaultBrush). - Elevation values (shadow intensity + 1 px contour, per the docs): Window 128 · Dialog 128 · Flyout 32 · Tooltip 16 · Card 8 · Control 2 · Layer 1. Controls vary elevation by state: Rest 2 · Hover 2 · Pressed 1. Higher elevation → larger, softer shadow.
- Use shadows purposefully, not decoratively — standard flyouts/dialogs/tooltips already carry the
right shadow for their elevation. For custom depth use
ThemeShadow/DropShadow, sparingly.
- Spacing snaps to a 4‑epx grid — consistent gutters/margins; build on Fluent's rhythm rather than inventing a parallel scale.
- Rounded corners — three levels (Microsoft Learn Geometry):
- 8 px — top‑level containers: app windows, flyouts, dialogs (resource
OverlayCornerRadius, default 8). - 4 px — in‑page elements: buttons, list backplates, text boxes, combo boxes, bars (ProgressBar/
ScrollBar/Slider), and ToolTip (a small‑size exception) — resource
ControlCornerRadius, default 4. - 0 px — straight edges that intersect other straight edges, and windows when snapped/maximized.
- 8 px — top‑level containers: app windows, flyouts, dialogs (resource
- Don't round where elements meet flush: the two halves of a
SplitButton, or the edge where a flyout connects to the control that invoked it. Override globally only viaControlCornerRadius/OverlayCornerRadiusinApp.xaml.
Use Segoe Fluent Icons wherever a system glyph appears (nav, command bars, buttons, status). It
replaced Segoe MDL2 Assets in Windows 11; glyphs live in the Unicode Private Use Area (E700–
F8CC). Ranges E0‑–E5‑ are legacy/deprecated — don't use them.
- Reference by control, not raw text. Use
SymbolIconwith theSymbolenum (<SymbolIcon Symbol="Find"/>), orFontIconwithGlyph+FontFamily="Segoe Fluent Icons"(or{StaticResource SymbolThemeFontFamily}) for glyphs outside the enum. (Web/Fluent React: use Fluent UI System Icons — regular/filled.) - Sizes: render at 16, 20, 24, 32, 40, 48, 64 for crisp outlines; off‑grid sizes blur. Match icon size/weight to adjacent text; filled variants for selected/active state, outline otherwise.
- Glyphs share a fixed width, height, and left origin, enabling layering/colorization; many have mirrored forms for RTL (Arabic/Hebrew). Icons are not meant inline with running text.
- Common glyphs (name · PUA): GlobalNavButton
E700· BackE72B· SearchE721· SettingsE713· More (•••)E712· AddE710· CancelE711· SaveE74E· DeleteE74D· FilterE71C· SortE8CB· ShareE72D· PlayE768· PauseE769· ChevronRightE76C. - Never put system glyphs in an app icon/logo; don't ship Segoe Fluent Icons to other platforms (license). Custom icons only when the set lacks one — match the softer Fluent geometry and metric grid.
Use these as the review lens — the Windows analog of "design language / structure / continuity".
- Five design principles (Windows 11): Effortless (fast, intuitive, precise) · Calm (soft, decluttered, recedes so the user stays focused) · Personal (adapts to the user's accent, theme, and habits) · Familiar (refreshed yet recognizably Windows — no learning curve) · Complete + Coherent (one consistent experience across surfaces). Grade designs against these qualities.
- Five Fluent pillars: Light · Depth · Motion · Material · Scale — the physical model behind Mica/Acrylic (Material), elevation/shadow (Depth/Light), reactive animation (Motion), and adaptive layout (Scale).
- Seven signature experiences (the foundation categories, each with a Learn page): Color · Elevation & layering · Iconography · Materials · Shapes & geometry · Typography · Motion. Every screen should be decomposable into these.
- Motion is reactive, direct, and context‑appropriate — it gives feedback to input and reinforces spatial way‑finding (connected animations, content transitions). Honor the user's Animations off / reduced‑motion setting; never animate decoratively.
Reproduce a Windows app's structure (Windows 11 Settings, Mail, File Explorer, Media Player are the IA references — copy the structure, never the pixels) from these WinUI primitives:
- App window & title bar. Use the Windows App SDK
AppWindow; extend content into the non‑client area and host a customTitleBarso Mica renders through the title bar. Keep the system caption buttons (minimize/maximize/close) and define the icon via aFontIconSource. - Shell / navigation.
NavigationView(left pane = sidebar, orTopmode) withMenuItems+FooterMenuItems, an integrated back button, andPaneTitle; keep hierarchy shallow. The content frame hosts pages. - Commanding (toolbar).
CommandBarwithPrimaryCommands+ a…overflow ofSecondaryCommands(each anAppBarButton/AppBarToggleButtonwith a Segoe Fluent icon and a label). AMenuBarfor classic File/Edit menus;MenuFlyout/CommandBarFlyoutfor context menus. - Search.
AutoSuggestBox(the Fluent search field, withQueryIcon="Find") in the header / command bar, scoped to the list. - Collections. A multi‑attribute, sortable collection (Name · Kind · Date · Size) is the
DataGrid(Community Toolkit) — resizable, stretching columns + click‑to‑sort headers. UseListViewfor row‑ / art‑led lists,GridViewfor tiles,ItemsRepeaterfor custom layouts. Never hand‑lay columns in aStackPanel. - Inspector / right drawer. A trailing
SplitViewpane or a list‑detail layout — persistent / dismissible, not a modalContentDialog. - Dialogs & transient surfaces.
ContentDialogfor modal decisions (rides on Smoke);Flyout/TeachingTipfor transient/contextual UI (on Acrylic);InfoBarfor inline, non‑blocking status. Match the surface to the job.
Mica conveys active vs. inactive automatically; inactive windows recede. Custom surfaces must respect this — don't keep a bright accent highlight active while the window is in the background, and don't paint a window background that overrides Mica's focus states. Standard controls handle hover/pressed elevation (§1.4) for free.
When a task or screenshot implies one, map it to the WinUI control first; each entry gives the rule set and the violations to reject.
NavigationView(shell / sidebar) — top‑level navigation between areas. Left pane (orTop);MenuItems+FooterMenuItems(settings/account pinned to the footer); integrated back button and pane toggle;NavigationViewItem= Segoe Fluent icon + short label; keep hierarchy shallow (use a content list‑pane for a third level, not deep nesting). Reject: a web hamburger drawer or an Electron sidebar transplanted as custom XAML; critical actions buried below the fold; a 3‑level nav tree.CommandBar(commanding) — top‑edge commands.PrimaryCommandsvisible; the rest collapse into the…(More) overflow asSecondaryCommands; eachAppBarButtoncarries a Segoe Fluent icon + a label; group related commands; put the right commands on the right surface (page vs. selection). Reject: a hand‑laidStackPanel"toolbar"; icon‑only commands with no label/tooltip; a manual overflow (the control provides one).ListView/GridView/ItemsRepeatervsDataGrid—DataGridfor multi‑attribute, sortable, resizable‑column data (click a header to sort, re‑click reverses);ListViewfor row/art‑led lists,GridViewfor tiles,ItemsRepeaterfor bespoke virtualized layouts. Headers: nouns, sentence case. Reject: aStackPanel‑column fake table (no sort/resize); tabular data forced into cards.- Buttons & controls —
Button(standard) · Accent button (Style="{StaticResource AccentButtonStyle}", the one primary action per view, responds to Enter/default) ·Hyperlink Button·ToggleButton·SplitButton/DropDownButton(a default action + a menu) ·ToggleSwitchfor on/off. Destructive actions are explicit and confirmed, never the default accent. Signal the preferred option by style, not size; ≤ 1 accent button per view. Reject: size used as hierarchy; a destructive default; >1 accent button; a templated control with no hover/ pressed/disabled state. - Dialogs, flyouts & status —
ContentDialog(modal, on Smoke; ≤ 3 buttons: primary/secondary/close) ·Flyout&TeachingTip(transient, contextual, on Acrylic) ·InfoBar(inline, dismissible status — info/success/warning/error) ·ToolTip(hover hint, 4 px corners). Reject: aContentDialogused where an inlineInfoBaror a dismissibleSplitViewinspector belongs; a custom modal that doesn't dim with Smoke. - Notifications — app/toast notifications via the Windows App SDK
AppNotificationManager+AppNotificationBuilder. Reject: the deprecated UWPToastNotificationManager.
WinUI 3 / Windows App SDK is the primary, fully‑native Fluent target. WPF is a first‑class secondary target via the .NET 9 Fluent theme. UWP/WinUI 2 and WinForms are legacy/migration only.
WinUI 3 / Windows App SDK (declarative, no interop):
- Backdrops: set
Window.SystemBackdropto<MicaBackdrop/>or<DesktopAcrylicBackdrop/>; Mica Alt via<MicaBackdrop Kind="BaseAlt"/>. - Title bar: hide the default bar, extend into the non‑client area, host a custom
TitleBarso Mica shows through; map the icon viaFontIconSource. - Theme resources:
{ThemeResource …}keys + theme dictionaries (Light/Dark/HighContrast). - Notifications:
AppNotificationManager(not UWP toast APIs).
WPF (.NET 9 Fluent theme) (XAML bindings exist; backdrops need DWM interop):
- Enable Fluent: declare
ThemeMode="System"on<Application>(or mergepack://application:,,,/PresentationFramework.Fluent;component/Themes/Fluent.xaml). TheThemeModeAPI is experimental — suppressWPF0001(<NoWarn>$(NoWarn);WPF0001</NoWarn>or#pragma). - Mica/Acrylic & corners (DWM P/Invoke): WPF has no native Mica binding — call
DwmSetWindowAttribute(dwmapi.dll): Mica =DWMWA_SYSTEMBACKDROP_TYPE (38)→DWMSBT_MAINWINDOW (2); Acrylic =(38)→DWMSBT_TRANSIENTWINDOW (3); dark frame =DWMWA_USE_IMMERSIVE_DARK_MODE (20)→ TRUE; rounded corners =DWMWA_WINDOW_CORNER_PREFERENCE (33)→DWMWCP_ROUND (2)/DWMWCP_ROUNDSMALL (3). - Accent & theming: reference
SystemColors.AccentColorBrushKey(+Light1/2/3,Dark1/2/3) viaDynamicResourceso OS personalization flows through. - Security: never emit
BinaryFormatter(removed in .NET 9 — deserialization risk); for clipboard/state/drag‑drop useSystem.Text.Json.
- Theme resources over literals. Colors/brushes →
{ThemeResource …}(WPFDynamicResourceSystemColors); text → type‑rampStyles; spacing/sizes → aThickness/x:Doubleresource set, never magic numbers; never hard‑code hex orFontSize. - No hard‑coded frames except fixed‑geometry icons/shapes. Layout via
Grid(*/Auto),StackPanel,RelativePanel, alignment, andMargin/Padding— so windows resize and epx scaling works. ReserveCanvasfor genuine overlap. - MVVM by default. Prefer compiled
{x:Bind}(withx:DataType) over{Binding}; ViewModels withINotifyPropertyChanged(CommunityToolkit.MvvmObservableObject/[ObservableProperty]/[RelayCommand]); commands over event handlers; keep code‑behind thin. - Compose, don't monolith. Fracture complex views into small
UserControls /DataTemplates withx:DataType; useResourceDictionary(incl. theme dictionaries for Light/Dark/HighContrast) and implicit styles. - Let standard controls carry the design. Restyle via
Style/ControlTemplatelightweight styling (override theme‑resource keys), not by rebuilding a control; keep custom templates minimal. - Async & threading. Marshal UI updates to the dispatcher (
DispatcherQueue); never block the UI thread; useasync/awaitfor I/O. - Verify across themes. Build against the latest SDK and confirm in Light + Dark + High Contrast, with Narrator, and at multiple DPI/window sizes before sign‑off.
Execute in order; stop and verify against official docs at any uncertain step.
- Platform disambiguation. Confirm the target is Windows and which framework — Mica/Acrylic (vs. Apple Liquid Glass), Segoe Fluent Icons (vs. SF Symbols), Segoe UI Variable, min/max/close caption buttons top‑right, NavigationView/CommandBar idiom, 8/4 px corners. If it isn't Windows, this constitution doesn't apply.
- Spatial & grid topology. Snap arbitrary padding/margins to the nearest 4 epx; translate absolute
(CSS
position:absolute, Electron) layouts into resilientGrid*/Auto(andStackPanel), limitingCanvasto true overlap. - Material & layering inference. Separate Z‑layers: wallpaper‑tinted window body → Mica (Mica Alt
if tabbed); translucent transient menu/popup → Acrylic; solid surface above the base → a card
(
CardBackgroundFillColorDefaultBrush) on a layer (LayerFillColorDefaultBrush); modal dim → Smoke. Apply viaSystemBackdrop(WinUI) or DWM (WPF) — never a hand‑rolled blur. - Control mapping & translation. Aggressively map every non‑native pattern to its nearest WinUI
control (web hamburger →
NavigationView; web toolbar →CommandBar; sort control → header sort /DropDownButton+MenuFlyout; overflow →…SecondaryCommands; search →AutoSuggestBox; modal →ContentDialog; inline banner →InfoBar). Synthesize a custom control only when none fits — and document why. - State & focus inference. Identify interactive states and where active/inactive (Mica focus), hover/pressed elevation, and accent selection apply; map "unavailable" to a disabled (not hidden) state; map destructive actions to a confirmed, non‑accent button.
- Token extraction. Resolve text to type‑ramp
Styles, colors to theme brushes, corners toControlCornerRadius/OverlayCornerRadius, spacing to the 4‑epx set. Produce resource references, not literals. - Validation. Render across Light + Dark + High Contrast, verify contrast and keyboard / Narrator support, and re‑check each non‑obvious choice against the cited Fluent/Learn section before sign‑off.
When the user shares a screenshot, design, or a task that references one, don't just reproduce it — grade it against Fluent 2 / the Windows guidance first, then build. Produce findings:
- Identify the surface (window / title bar / NavigationView / CommandBar / list / dialog / inspector) and map each visible element to a native control (§3.2).
- Run the §9 sign‑off checklist against what's shown: type ramp + sentence case, theme brushes + the three themes, material/layer model (Mica vs. Acrylic vs. Smoke), elevation, corner radii, Segoe Fluent iconography, contrast + keyboard/Narrator, native‑control fidelity, active/inactive focus.
- Emit findings as
violation → the Fluent/Learn rule it breaks (cite §/page) → the WinUI control / theme resource / API that fixes it → severity, separating Blockers (platform‑foreign control, reinvented component, stacked materials, contrast failure, dishonest disabled/empty state) from polish. - Then propose the fix in real control names. If the reference is non‑Windows (an Apple / web screenshot), translate the intent to the Fluent idiom — never copy the foreign chrome.
A shared image is graded against the rules, not copied — the antidote to "looks close enough."
- Contrast (WCAG 2.x AA): text 4.5 : 1 (≥ 18 pt or bold 3 : 1); meaningful UI/graphics 3 : 1. Verify in light, dark, and High Contrast; ship and test the High‑Contrast theme (it is first‑class on Windows, not optional).
- Full keyboard support: logical Tab order, access keys (
AccessKey) and accelerators, and a visible focus visual on every interactive element; nothing reachable by pointer only. - Narrator / UI Automation: label every control via
AutomationProperties.Name(andHelpText/LabeledByas needed); useLiveRegionfor async status; expose correct control patterns; logical reading order. - Don't encode meaning in color alone — add icon/glyph/shape/label (§1.2).
- Targets & input: comfortable hit targets for touch/pen/mouse; support pointer, keyboard, pen, and gamepad where relevant.
- Motion: honor Animations off / reduced‑motion — disable connected animations and parallax; keep essential feedback.
- Cognitive: minimize time‑boxed/auto‑dismiss UI; double‑confirm hard‑to‑recover (destructive) actions; don't autoplay media without controls.
- Hard‑coded
FontSize/ hex colors /Width·Heightlayout for adaptive UI; a parallel type/spacing/ corner scale. - Bold/Italic emphasis or ALL‑CAPS / Title‑Case headers (use Semibold + sentence case); an iOS/macOS or Material type scale transplanted onto Windows.
- Custom backgrounds that defeat Mica focus; stacked materials (Acrylic on Mica on Acrylic); Acrylic on a long‑lived window body; a custom modal that doesn't dim with Smoke.
- A hand‑laid
StackPanel"table" (no sort/resize) or "toolbar"; aContentDialogwhere anInfoBaror aSplitViewinspector belongs. - A web hamburger drawer, an Electron/web chrome, or an Apple sidebar/tab bar transplanted onto Windows; copying a non‑Windows screenshot's chrome instead of translating the intent to Fluent.
- MDL2 Assets / Metro glyphs and styling; legacy E0‑/E5‑ Segoe glyphs; UWP
ToastNotificationManager;BinaryFormatter; UWP/WinUI 2 patterns where WinUI 3 exists. -
1 accent button per view; a destructive default; size used as hierarchy; a templated control with no hover/pressed/disabled/focus state.
- A bright accent highlight left active while the window is inactive.
- Every type style is a ramp
Style(no rawFontSize); sentence case; Semibold (not Bold/Italic) for emphasis. - Every color is a theme brush (
{ThemeResource}/ WPFSystemColorsDynamicResource) — resolves in light + dark + High Contrast; accent used sparingly. - Materials correct: Mica base (Mica Alt if tabbed), Acrylic only on transient surfaces, Smoke behind modals; no stacked materials; window background doesn't defeat Mica focus.
- Layering/elevation + corner radii (8 px containers / 4 px in‑page / 0 px flush) match the model; spacing on the 4‑epx grid.
- Structure uses native
AppWindow+ customTitleBar+NavigationView+CommandBarand aSplitView/list‑detail inspector;DataGridvsListView/GridViewchosen correctly. - Native controls match the §3.2 catalog (NavigationView, CommandBar overflow, DataGrid sort/ resize, button roles/one accent, dialog vs InfoBar vs inspector) — nothing reinvented.
- All iconography is Segoe Fluent Icons (Fluent UI System Icons on web) at on‑grid sizes; filled = selected; mirrored for RTL.
- Contrast + hit targets meet AA in all three themes; full keyboard + Narrator
(
AutomationProperties.Name) + visible focus; reduced‑motion honored. - Window active/inactive focus handled for custom surfaces.
- Code: MVVM with
{x:Bind}, composedUserControls, theme dictionaries, lightweight styling, dispatcher‑marshaled UI,System.Text.Json(noBinaryFormatter). - Framework deltas applied (WinUI
SystemBackdropvs. WPFThemeMode/DWM); every non‑trivial decision cites an official source below.
Fluent 2 design system: fluent2.microsoft.design — Typography · Color · Material · Elevation · Shapes.
Windows apps design (Microsoft Learn — learn.microsoft.com/windows/apps/design/…):
Design overview ·
Design principles ·
Typography ·
Color ·
Materials ·
Layering & elevation ·
Geometry ·
Rounded corners ·
Mica ·
Acrylic ·
Segoe Fluent Icons ·
Controls ·
NavigationView ·
CommandBar ·
Accessibility.
Develop (WinUI / Windows App SDK / theming):
WinUI 3 ·
Windows App SDK ·
Theming ·
XAML theme resources ·
Apply Mica (desktop) ·
SystemBackdrop ·
App notifications.
WPF (.NET 9 Fluent theme): What's new in WPF for .NET 9 · Styles & templates.
Engineering sessions: Microsoft Build — WinUI / Windows App SDK sessions; Windows App SDK release notes; WinUI 3 Gallery (live, interactive control reference).
Operating reminder: when in doubt, open the live Fluent 2 / Microsoft Learn / WinUI doc and confirm before emitting code. Spec numbers (ramp sizes, corner radii, brush keys, backdrop APIs) and controls evolve every release; this constitution is a grounding lattice, not a substitute for the source of truth.