microsoft/microsoft-ui-reactor/reactor-windowing
Claude Code and agent skill by microsoft/microsoft-ui-reactor
- vendor
Checking that the SKILL.md file is still in the repository.
Reactor top-level windowing cookbook: WindowSpec, OpenWindow, draggable windows, borderless/tool windows, placement persistence, taskbar visibility, z-order, aspect ratio, SizeToContent, displays, taskbar integration, and owner-window file/folder pickers.
Install
npx vskill@latest install microsoft/microsoft-ui-reactor/reactor-windowingSKILL.md
The same SKILL.md was published earlier as microsoft/microsoft-ui-reactor/reactor-windowing.
Reactor Windowing
Use this skill when a task involves top-level windows, placement, shell chrome, taskbar features, displays, or native pickers.
Core APIs
WindowSpec is immutable startup intent. ReactorWindow is the live handle for runtime mutators (SetSize, SetPosition, SetAspectRatio, BeginDragMove, SavePlacement, Update).
Size and resize
Rules:
AspectRatiocannot combine withResizeMode.NoResize.AspectRatiocannot combine withSizeToContent.SizeToContentignores maximized windows and may settle one frame after mount.
Movement, drag, and persistence
Window hooks (UseWindow, UseWindowPosition, UseWindowDragMove, UseDpi, UseWindowState, UseIsActive, UseClosingGuard, UseWindowAspectRatio, …) bind the window whose host renders the component, including nested components and virtualized rows, never "the most recently active window". In tray flyouts and ReactorHostControl embeds they return null / their outside-a-window values.
Persistence requires PersistPlacement; use .WithPersistence(...) for the common case. PersistenceId alone is only identity for persistence systems.
Placement goes to an auto-picked store: ApplicationData.Current.LocalSettings when packaged, else a JSON file under %LOCALAPPDATA%/<ProcessName>/. That default is keyed on the process name, so renaming the exe strands saved layouts. Unpackaged apps can opt into a stable publisher/product identity before the first OpenWindow:
Opt-in rather than default: the two stores key data differently, so switching does not migrate existing layouts. Multiple instances sharing one publisher/product are safe — writes are serialized across processes, so one window's save cannot drop another's entry. Two windows sharing a PersistenceId still overwrite each other, by design.
Z-order, taskbar, and chrome
Notes:
Floatingstays above owners and sibling Reactor app windows.- Windows can decline
AlwaysOnTopwhile another app owns the foreground. Reactor logs a warning and reapplies it the next time the app is activated. ToolWindowhides from the taskbar by default unlessShowInTaskbaris explicit.WindowStyle.Noneshould normally setIsMovableByBackground = true.UseIsCovered()is a z-order hint, not pixel-accurate occlusion.
Title bar and backdrop
A TitleBar(...) element infers ExtendsContentIntoTitleBar = true when the spec value is null. Explicit true or false wins.
Close-safety caveat (#537):ExtendsContentIntoTitleBar = falsewith amountedTitleBar(...)is allowed and previously crashed on close(STATUS_HEAP_CORRUPTION); Reactor now flips the window back intocontent-extended mode just before the native close (every close/exit/disposepath) so it is safe. Prefer omittingTitleBar(...)when you want the systemtitle bar.
Title bar icon
A TitleBar(...) with no .Icon(...) inherits the window's icon: WindowSpec.Icon if declared, otherwise the Assets\AppIcon.ico convention beside the app. Do not restate the app icon on the title bar — that is the default. Use .Icon(...) only to show a different mark there.
Not inherited: an icon that exists only as an executable PE resource (<ApplicationIcon>), because that stage yields a raw HICON with no path and a XAML IconSource needs an image source; and an embedded window (WindowSpec.Embed), which never receives a window icon at all.
Icon sources
Not every surface takes every kind, because they need different primitives:
| Surface | FromPath | FromResource | FromBytes / FromRgba | |
|---|---|---|---|---|
| Window caption / Alt-Tab | yes | yes | no | |
| Tray icon, taskbar overlay, thumbnail toolbar | yes | no | yes | |
| Jump-list entry | unpackaged only | packaged only | no |
The three shell surfaces need a raw HICON (LoadImageW on a file, or CreateIconFromResourceEx on in-memory data), neither of which reads an ms-appx: URI. Jump lists need a Uri. AppWindow.SetIcon needs a filesystem path. An unusable source is skipped with a diagnostic, never thrown — on the window that means falling through to Assets\AppIcon.ico or the PE icon, so a binary icon: leaves the window no barer than declaring none.
Reach for the binary factories when the icon is an embedded resource, a download, or drawn at runtime: they avoid writing a temporary file. The bytes are copied at construction and held for the WindowIcon's lifetime.
Tall title bar
.Tall() / .HeightOption(WindowTitleBarHeight) (Standard / Tall / Collapsed) is the layout for a title bar hosting a back button or pane toggle. It sets both the system caption (AppWindow.TitleBar.PreferredHeightOption) and the WinUI title-bar control's own height — the control does not follow the caption, so setting one alone leaves them disagreeing. An explicit .Height(...) wins over the implied 48; WindowSpec.TitleBarHeight wins over the element.
Requires a content-extended window — the native setter throwsERROR_INVALID_STATEotherwise. Reactor applies it after its owncontent-extension flip and warns instead of throwing, so prefer this oversettingPreferredHeightOptionfrom aUseEffect.
Caption button theme
WinUI does not carry an element's RequestedTheme to the system caption buttons (min/max/close), so a root themed opposite to the system keeps system-themed buttons. .PreferredTheme(WindowTitleBarTheme) (Legacy / UseDefaultAppMode / Light / Dark) writes AppWindow.TitleBar.PreferredTheme on mount and on change — no UseEffect. Opt-in: with nothing declared Reactor never writes the property, and removing a declaration restores the value the caption had before Reactor first applied one. WindowSpec.TitleBarTheme wins over the element. Unlike the height, it does not need a content-extended window.
Custom title-bar content and drag regions
TitleBar(...) accepts a leading .LeftHeader(...), central .Content(...), and trailing .RightHeader(...), each hosting a Reactor element. Removing a slot with with { LeftHeader = null } also cleans up its subtree. Interactive controls are excluded from the drag region automatically (WinApp SDK ≥ 2.1.3). Override per element with .IsDragRegion(false) (force clickable) or .IsDragRegion(true) (force draggable), and add .AutoRefreshDragRegions() when the content changes across renders:
BackdropKind.Transparent falls back to no backdrop when unsupported by the referenced Windows App SDK.
Taskbar, displays, and pickers
PickFileAsync / PickMultipleFilesAsync / PickFolderAsync / PickMultipleFoldersAsync / PickSaveFileAsync return PickFileResult / PickFolderResult (Microsoft.Windows.Storage.Pickers, exposing .Path); cancellation returns null or an empty list. The owner is the window whose host renders the component (not whichever window is active), the dialog works in elevated apps, and the call throws InvalidOperationException once the component has unmounted or its window has closed. Inside ReactorHostControl the owner is the window the control is loaded in when the method is called; an unloaded control throws. FileTypeChoices is an ordered IReadOnlyList<FileTypeChoice> whose order sets the default entry; labels must be unique. Options also take Title, SuggestedFolder, SuggestedStartFolder, InitialFileTypeIndex, and (save) DefaultFileExtension / ShowOverwritePrompt. There is no arbitrary HWND parameter.
Render errors
Outside an ErrorBoundary, a render failure shows a built-in fallback with the full exception text. Replace it app-wide, per window, or per host; a host's own handler wins, and null on the window/host falls through to the app default:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 14 Nov 2026.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/reactor/skills/reactor-windowing/SKILL.md
Popularity
- Repository stars
- 896
- Repository forks
- 67
- 7-day trend score
- 37
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/microsoft/microsoft-ui-reactor/reactor-windowing)