Repository navigation
Description
Problem
The first thing anyone sees when they try Reactor is the app that dotnet new reactorapp scaffolds (the WinUIApp-CSharp template). The good news: it already opens with a Mica backdrop, an extended/modern title bar showing the app title, and a small interactive Hello, {name}! greeting. So most of the modern-Windows-11 baseline is already there.
The one thing missing is an app-mark icon in the title bar. A modern Windows 11 caption almost always carries a small app mark on the left next to the title; without one the title bar looks a touch unfinished, and the template misses a natural chance to show authors the TitleBar.Icon(...) API.
Proposed solution
Give the template's title bar a placeholder app-mark icon — a Segoe Fluent Icons CircleRing glyph (\uEA3A) — with a comment pointing authors at a bundled .ico for when they add their own. That is the whole template change; the greeting, Mica backdrop, and extended title bar already ship on main and are left exactly as-is.
var titleBar = TitleBar("Company.ReactorApp1")
.Icon(FontIcon("\uEA3A", "Segoe Fluent Icons")) // CircleRing placeholder mark
.Flex(shrink: 0);Additional context — a framework bug this surfaced
Adding that one icon line immediately crashed the scaffolded app. Placing a FontIcon with no explicit size into an icon-source slot (TitleBar.Icon(...)) threw ArgumentException from TitleBar.set_IconSource ("Value does not fall within the expected range" / E_INVALIDARG): ResolveIconSource was building the FontIconSource with FontSize = NaN. Reactor caught the exception and painted the error into the window instead of the app — so today a naive "just add a title-bar icon" doesn't actually work.
This is a latent framework bug independent of the template (it fires for any sizeless FontIcon in an IconSource slot — TitleBar, TabView, …). It is fixed in the same PR (#855) with a selftest regression.
Alternatives considered
- Ship a real
.icoasset in the template so the title bar and taskbar share one icon. Deferred: it adds binary assets, anAssets/folder, and an<ApplicationIcon>to every scaffold. A font glyph is zero-asset and trivially replaceable — the template comment points authors at.Icon("ms-appx:///Assets/AppIcon.ico")for when they add their own. - Leave the title bar iconless. Less polished, and it skips a natural teaching moment for the
TitleBar.Icon(...)API.
Confirmation
- I have searched existing issues and specs for prior discussion of this idea.
Activity
Add app-mark icon to the app template and fix FontIconSource NaN crash
[-][Feature] Modernize the default app template to reflect modern Windows UX out of the box[/-][+][Feature] Give the default app template a title-bar app-mark icon[/+]Changelog: add missing preview.12 entries (analyzer suite, DSL/hook A…