A polished Mica/Fluent 3x3 Tic-Tac-Toe window built from generated WinUI
projections. It demonstrates unpackaged WinAppSDK startup, XAML loading, events,
window resizing, a named Python TicTacToePanel XAML registration, a native
measure_override, and deterministic registration cleanup.
- Windows 11 on x64 with Python and Rust/Cargo available.
- An unpackaged x64 WinAppSDK 2.3 fixture:
Microsoft.UI.Xaml.winmd, a newline-separated reference-WinMD list, and the matching x64Microsoft.WindowsAppRuntime.Bootstrap.dll. The matching x64 WinAppSDK framework/runtime packages and resources must also be installed or available to the unpackaged runtime. dynwinrtinstalled in the Python interpreter used to run the sample.- A compatible
dynwinrt-codegenexecutable, either onPATHor passed with-Codegen.
No published package is assumed. From the repository root, build the codegen executable and install the runtime into the active Python environment:
cargo build -p dynwinrt-codegen --release
Push-Location bindings\py
python -m pip install maturin
python -m maturin develop --release
Pop-LocationFrom this sample directory, generate the local package and copy the bootstrap DLL (replace the fixture paths):
.\generate.ps1 `
-WinuiWinmd C:\fixtures\winappsdk\metadata\Microsoft.UI.Xaml.winmd `
-RefList C:\fixtures\winappsdk\winmd-reference-list.txt `
-BootstrapDll C:\fixtures\winappsdk\x64\Microsoft.WindowsAppRuntime.Bootstrap.dll `
-Codegen ..\..\..\target\release\dynwinrt-codegen.exeIf the CLI is installed on PATH, omit -Codegen. Run with the same Python
environment that contains dynwinrt:
.\run.ps1 -Python C:\path\to\python.exegenerated\, .runtime\, and Python caches are local build artifacts and are
not tracked.