© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
8 replies
Di0n

❔ Fontawesome icons dont support converting in WPF

Hi, im following a youtube tutorial on how to do a calendar UI and in one of the steps im supposed to make the following inside a UserControl
public partial class Items : UserControl
    {
        public Items()
        {
            InitializeComponent();
        }



        public string Title
        {
            get { return (string)GetValue(TitleProperty); }
            set { SetValue(TitleProperty, value); }
        }

        public static readonly DependencyProperty TitleProperty =
            DependencyProperty.Register("Title", typeof(string), typeof(MenuButton));

        public string Time
        {
            get { return (string)GetValue(TimeProperty); }
            set { SetValue(TimeProperty, value); }
        }

        public static readonly DependencyProperty TimeProperty =
            DependencyProperty.Register("Time", typeof(string), typeof(MenuButton));


        public SolidColorBrush Color
        {
            get { return (SolidColorBrush)GetValue(ColorProperty); }
            set { SetValue(ColorProperty, value); }
        }

        public static readonly DependencyProperty ColorProperty =
            DependencyProperty.Register("Color", typeof(SolidColorBrush), typeof(MenuButton));


        public FontAwesome.Sharp.Icon Icon
        {
            get { return (FontAwesome.Sharp.Icon)GetValue(IconProperty); }
            set { SetValue(IconProperty, value); }
        }

        public static readonly DependencyProperty IconProperty =
            DependencyProperty.Register("Icon", typeof(FontAwesome.Sharp.Icon), typeof(MenuButton));

        public FontAwesome.Sharp.Icon IconBell1
        {
            get { return (FontAwesome.Sharp.Icon)GetValue(IconBell1Property); }
            set { SetValue(IconBell1Property, value); }
        }

        public static readonly DependencyProperty IconBell1Property =
            DependencyProperty.Register("IconBell1", typeof(FontAwesome.Sharp.Icon), typeof(MenuButton));


    }
public partial class Items : UserControl
    {
        public Items()
        {
            InitializeComponent();
        }



        public string Title
        {
            get { return (string)GetValue(TitleProperty); }
            set { SetValue(TitleProperty, value); }
        }

        public static readonly DependencyProperty TitleProperty =
            DependencyProperty.Register("Title", typeof(string), typeof(MenuButton));

        public string Time
        {
            get { return (string)GetValue(TimeProperty); }
            set { SetValue(TimeProperty, value); }
        }

        public static readonly DependencyProperty TimeProperty =
            DependencyProperty.Register("Time", typeof(string), typeof(MenuButton));


        public SolidColorBrush Color
        {
            get { return (SolidColorBrush)GetValue(ColorProperty); }
            set { SetValue(ColorProperty, value); }
        }

        public static readonly DependencyProperty ColorProperty =
            DependencyProperty.Register("Color", typeof(SolidColorBrush), typeof(MenuButton));


        public FontAwesome.Sharp.Icon Icon
        {
            get { return (FontAwesome.Sharp.Icon)GetValue(IconProperty); }
            set { SetValue(IconProperty, value); }
        }

        public static readonly DependencyProperty IconProperty =
            DependencyProperty.Register("Icon", typeof(FontAwesome.Sharp.Icon), typeof(MenuButton));

        public FontAwesome.Sharp.Icon IconBell1
        {
            get { return (FontAwesome.Sharp.Icon)GetValue(IconBell1Property); }
            set { SetValue(IconBell1Property, value); }
        }

        public static readonly DependencyProperty IconBell1Property =
            DependencyProperty.Register("IconBell1", typeof(FontAwesome.Sharp.Icon), typeof(MenuButton));


    }




So basically after adding this new binding methods on the icons and text im getting errors on the icon converter -> Error XDG0028 The TypeConverter for "Icon" does not support converting from a string
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

❔ Icons in WPF
C#CC# / help
4y ago
❔ FontAwesome in .net maui icons bugged
C#CC# / help
3y ago
❔ WPF Image not loading From FontAwesome
C#CC# / help
3y ago
QuestPDF + FontAwesome
C#CC# / help
4y ago