lepoco / wpfui

WPF UI provides the Fluent experience in your known and loved WPF framework. Intuitive design, themes, navigation and new immersive controls. All natively and effortlessly.
https://wpfui.lepo.co
MIT License
7.74k stars 756 forks source link

Support for duotone(?) icons #1279

Open chucker opened 1 week ago

chucker commented 1 week ago

Is your feature request related to a problem? Please describe

[ Preface: I'm not sure that's the right nomenclature for WinUI / Fluent Icons. The WinUI 3 Gallery app doesn't seem to show this anywhere.

FontAwesome calls them "duotone". Apple's SF Symbols calls similar approaches "Palette/Hierarchical/Multicolor Rendering", depending on what color palette you use. ]

A typical Windows 11 context menu will feature icons that are largely monochrome, but not entirely:

image

This appears to be a combination of three colors:

I don't believe this is currently possible in WPF UI.

Describe the solution you'd like

Perhaps SymbolIcon should provide a SecondaryForeground or AccentForeground property that takes a Brush.

In addition, to avoid breaking backwards compatibility, perhaps it should provide a ColoringMode property, with:

enum ColoringMode
{
    Custom = 0, // the default, for compat reasons (maybe this should be called `Monochrome` instead?)
    Automatic
}

Describe alternatives you've considered

For now, I manually set one color for each icon. This seems less than ideal.

Additional context

I'm unsure to what extent Fluent System Icons provides this context. For example, does the glyph ArrowSort24 say which portions are supposed to be rendered in which semantic color?