# ferroui_themes_winui

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-themes-winui/

**module** · [`ferroui-themes-winui`](/docs/0.5.0/api/ferroui-themes-winui/) · v0.5.0

```rust
module ferroui_themes_winui
```

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`](/docs/0.5.0/api/ferroui-themes-winui/struct-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`).

```ignore
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`](/docs/0.5.0/api/ferroui-themes-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`](/docs/0.5.0/api/ferroui-themes-winui/converters/struct-cornerradiustothicknessconverter/)); [`primitives`](/docs/0.5.0/api/ferroui-themes-winui/primitives/) has the primitives of WinUI
that its templates use and FerroUI's control set has no counterpart of
([`primitives::InfoBarPanel`](/docs/0.5.0/api/ferroui-themes-winui/primitives/struct-infobarpanel/), [`primitives::TabViewEqualWidthPanel`](/docs/0.5.0/api/ferroui-themes-winui/primitives/struct-tabviewequalwidthpanel/)).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.WinUI/lib.rs#L1)

## Contents

- [`accents`](/docs/0.5.0/api/ferroui-themes-winui/accents/) — module
- [`converters`](/docs/0.5.0/api/ferroui-themes-winui/converters/) — module
- [`primitives`](/docs/0.5.0/api/ferroui-themes-winui/primitives/) — module
- [`excluded_documents`](/docs/0.5.0/api/ferroui-themes-winui/function-excluded_documents/) — function
- [`ExcludedDocument`](/docs/0.5.0/api/ferroui-themes-winui/struct-excludeddocument/) — struct
- [`register_types`](/docs/0.5.0/api/ferroui-themes-winui/function-register_types/) — function
- [`ASSEMBLY`](/docs/0.5.0/api/ferroui-themes-winui/static-assembly/) — static
- [`DensityStyle`](/docs/0.5.0/api/ferroui-themes-winui/enum-densitystyle/) — enum
- [`WinUITheme`](/docs/0.5.0/api/ferroui-themes-winui/struct-winuitheme/) — struct

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
