Windows (XAML)

windows-xaml hosts Windows’ own XAML controls in a plain Win32 window through XAML Islands. There is no framework runtime for your users to install.

Which XAML. This backend uses system XAML — the Windows.UI.Xaml stack that ships inside Windows 10 and 11 — not WinUI 3 / the Windows App SDK. That is why the target is named windows-xaml rather than after a XAML release: many control names exist in both namespaces with different behavior (this ProgressRing is the UWP dotted ring, not WinUI 3’s arc; Pivot doesn’t exist in WinUI 3 at all). The links below point at the UWP Windows.UI.Xaml API reference accordingly.

Getting started

You need the Visual Studio C++ Build Tools (for MSVC and the Windows SDK) and the MSVC Rust toolchain. The C++/WinRT shim is compiled by build.rs against the plain Windows SDK.

rustup default stable-msvc
cargo install day-cli
day new app my-app --toolkit windows-xaml
cd my-app
day launch -p windows-xaml

day doctor --toolkit xaml checks the SDK and toolchain.

day pack -p windows-xaml     # .msix plus an NSIS -setup.exe

The NSIS installer is per-user: no elevation, a normal Add/Remove Programs entry, and a silent /S mode for managed deployment.

Caveats and special considerations

  • Less real-application use than the Apple, Linux, and Android targets. It builds and runs the full UI walkthrough in CI on every push, but no large app ships on it yet.
  • The web view needs the WebView2 Runtime. Day hosts a WebView2 composition visual — not the legacy EdgeHTML WebView. The runtime ships with Windows 11 and current Windows 10; if it is absent, the piece shows its URL-label fallback instead of failing.
  • No native segmented control exists in system XAML, so picker().segmented() is a horizontal row of radio buttons.
  • The inline time picker falls back to a flyout — system XAML has no inline clock.
  • Text-area read-only, selectable and spell-check patches are accepted but do nothing; those capabilities report unsupported.
  • No Lottie, no map on this backend — each renders its placeholder. cover() presents as a topmost window-sized child (no transition, programmatic dismissal only).
  • Radial gradients in a canvas are synthesized into a bitmap brush, because system XAML has LinearGradientBrush but no RadialGradientBrush (that type is XAML-only).

What each piece becomes

Day pieceXAML control (Windows.UI.Xaml.Controls)
column / row / stack / sectionCanvas (Day positions children absolutely)
labelTextBlock
buttonButton (AccentButtonStyle when prominent)
toggleToggleSwitch
sliderSlider
text_fieldTextBox
text_areaTextBox with AcceptsReturn
picker().menu()ComboBox
picker().segmented() / .inline()RadioButtons in a horizontal / vertical stack
progress(f)ProgressBar
spinner()ProgressRing
dividerBorder, 1px, themed stroke
scrollScrollViewer
listScrollViewer with Day-side cell pooling
nav (split and stack)NavigationView
nav_menuNavigationViewItems, or a ListView standalone
tabsPivot
imageImage
canvasCanvas with a Path per shape
dialogs / alerts / promptsContentDialog
file dialogsFileOpenPicker / FileSavePicker
menu barMenuBar
context menusMenuFlyout
external activity()ProgressRing
external combobox()editable ComboBox
external search_field()AutoSuggestBox
external date_picker()CalendarDatePicker, or CalendarView inline
external time_picker()TimePicker
external media()MediaPlayerElement
external webview()WebView2 composition visual inside a Border

Text measurement is XAML’s own measure pass (MeasureDesiredSize), with a re-measure after forcing layout when a templated control reports zero before the island’s first async pass.