Expand description
ferroui-themes-winui
The WinUI theme: the control styles, templates and theme resources of WinUI 3 (microsoft-ui-xaml), ported to the controls of FerroUI, in a light, a dark and a high contrast variant and in a normal and a compact density (docs/porting/winui-theme.md).
The theme is markup: WinUITheme.xaml (the document of the
WinUITheme class), Resources/*.xaml (one document per source
document of the theme of WinUI: the colours, brushes, sizes and the other
theme resources, written by scripts/winui-theme/convert.py, with the
system colours and the outlines of the symbol glyphs),
DensityStyles/Compact.xaml, Controls/WinUIControls.xaml (the list of
the control themes) and one document per control under Controls/. The
documents belong to the assembly FerroUI.Themes.WinUI, with the URIs
ferres://FerroUI.Themes.WinUI/<path>. They are compiled into the crate
and are not embedded as assets: a load by URI goes to the loader table of
the compiled markup, which answers the public document WinUITheme.xaml
(see build.rs).
application.styles().add(WinUITheme::new().as_style());The theme variants are the light and dark variants of FerroUI and
WinUITheme::high_contrast, the high contrast variant of WinUI.
converters has the value converters of WinUI that the theme resources
are instances of and FerroUI’s control set has no counterpart of
(converters::CornerRadiusToThicknessConverter); primitives has the primitives of WinUI
that its templates use and FerroUI’s control set has no counterpart of
(primitives::InfoBarPanel, primitives::TabViewEqualWidthPanel).
Modules§
- accents
- converters
- The value converters of the WinUI theme: the converters of microsoft-ui-xaml that the theme
resources name and FerroUI’s control set has no counterpart of (docs/porting/winui-theme.md,
section 5). Markup names them with
xmlns:winuiconverters="using:FerroUI.Themes.WinUI.Converters". - primitives
- The primitives of WinUI that the templates of the theme use and FerroUI’s control set has no
counterpart of (
Microsoft.UI.Xaml.Controls.Primitivesof microsoft-ui-xaml). Markup names them withxmlns:primitives="using:FerroUI.Themes.WinUI.Primitives".
Structs§
- Excluded
Document - A control theme document that is embedded but not part of the theme yet, because it names types that are not ported or is not finished.
- WinUI
Theme - Includes the WinUI theme in an application.
Enums§
- Density
Style - How much space the controls of the WinUI theme take: the normal density, or the compact one of
WinUI (
compact_themeresources.xaml).
Statics§
- ASSEMBLY
- What this crate states about itself for markup: its assembly name and the namespace the XML namespace of the framework maps to.
Functions§
- excluded_
documents - The control theme documents
Controls/WinUIControls.xamldoes not merge yet, fromControls/excluded.txt. - register_
types - Registers the namespaces, the types, the assembly, the embedded documents and the document loader of this crate (and of the crates it is built on). Cheap and idempotent.