Material Design Icons

In WecpofLogic assembly we now include the MaterialIcons-Regular.ttf (added as Resource) and MaterialIcons-Regular.codepoints (added as Embedded Resource).

We then have a fontfamilly defined like this:

<FontFamily x:Key="materialdesigniconsfont">pack://application:,,,/WECPOFLogic;component/Fonts/#Material Icons</FontFamily>

If you have that row in your WPF-application App.Resources you can then use use FontFamily={StaticResource materialdesigniconsfont} in xaml.

You must then use the character code per icon (the complete list is in MaterialIcons-Regular.codepoints).

There are new hooks on ViewModelWPFUserControl:

Eco.ViewModel.WPF.ViewModelWPFUserControl.IconFontFamilyResourceName = "materialdesigniconsfont";

Eco.ViewModel.WPF.ViewModelWPFUserControl.IconFontIconNameResolverInstall(IconNameResolver);

The IconNameResolver must take a named icon and return the correct character.

This page was edited 97 days ago on 02/10/2024. What links here