In design time. Your resources are not yet compiled and the current XAML
file that you have where it has the ComboBox
can't see the ResourceDictionary
.
Assuming your resources is defined in App.xaml
then you should have no problems with it when you run it in runtime as it'll be able to find the key
.
If you want to get rid of the error in design time then what you can do is on your XAML
file where the ComboBox
lives, you can add the ResourceDictioanry
so that it'll be able to find it.
Assuming this is a Window
and you have ResourceDictionary
that is not defined in the App.xaml
but as a separate file
<Window.Resources>
<ResourceDictionary Source=""/>
</Window.Resources>