Waft WinUI
WinUI controls and Fluent styling for Waft.
The library ports control templates, theme resources and behavior from Microsoft’s WinUI, and the settings controls (SettingsCard, SettingsExpander) of the Windows Community Toolkit. Waft handles rendering, layout and input.
Try it
Waft requires nightly Rust:
Run the gallery from the Waft repository, where the kit lives.
Use it
[]
= "0.5.0"
Build the app with FluentApp, the kit's MaterialApp: it shows the light or dark theme and the accent, gives text WinUI's body style, selection the accent and scrollables WinUI's thin bar and clamped edge, installs the Fluent icon font, and gives each page WinUI's Frame entrance. Controls that show popups need an Overlay ancestor. An app's content goes in a FluentPage, whose background reaches under a phone's system bars while its content stays clear of them and of the keyboard.
new
.theme
.dark_theme
.home
.into_widget
A WidgetsApp still works without a FluentApp; call install_icon_font yourself then, and give its page_route_builder FluentPageRoute::new for the same entrance. FluentPageRoute is a page route like MaterialPageRoute, so it can be pushed on its own.
A ThemeScope can also change WinUI's theme resources for its subtree, as XAML's resource dictionaries do: any in both themes, then light or dark. Each resource is a field named after its XAML key.
new
.any
.dark
ThemeScope::overriding(child) changes the enclosing scope's resources for one control, as <Control.Resources> does.
The gallery demonstrates application setup, font registration and control state.
Contributing
Porting guidance, tests and resource generation: the porting-winui skill.
License
MIT. Microsoft’s source, the Windows Community Toolkit’s and the bundled icon font retain their third-party notices.