Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix " MaterialDesignFloatingHintTextBox" could not be resolved

I am trying to make an UI with material design but when I want to use it I have an error: The resource " MaterialDesignFloatingHintTextBox" could not be resolved.

https://ibb.co/PcvdmqH how the error looks like

I installed from NuGet MaterialDesignThemes I imported this xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"

And in App.xaml I wrote this:

<ResourceDictionary x:Key="MaterialDesign">
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.Blue.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Indigo.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>

How can I fix it?

like image 701
robert.laszlo Avatar asked Jan 27 '26 17:01

robert.laszlo


1 Answers

First check your project resources, that you have the nugets for Material Design. Add this code in your App.Xaml file; under Application.Resources. It works for me. <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />

like image 93
Unzi007 Avatar answered Jan 30 '26 08:01

Unzi007



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!