Skip to main content

Crate ferroui_themes_winui

Crate ferroui_themes_winui 

Source
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.Primitives of microsoft-ui-xaml). Markup names them with xmlns:primitives="using:FerroUI.Themes.WinUI.Primitives".

Structs§

ExcludedDocument
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.
WinUITheme
Includes the WinUI theme in an application.

Enums§

DensityStyle
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.xaml does not merge yet, from Controls/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.