Reputation: 1249
I'm going through a book Mastering WPF and I'm trying to make one simple view with a converter work using MVVM pattern:
When I try to run it, I get this exception:
System.Windows.Markup.XamlParseException: ''Provide value on 'System.Windows.StaticResourceExtension' threw an exception.' Line number '12' and line position '44'.'
FileNotFoundException: Could not load file or assembly 'Kulagin.Mastering WPF.Converters, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
I don't understand why it tries to find a file Kulagin.Mastering WPF.Converters
. It's not a file, only a namespace.
In the file BitRateView.xaml
if I remove Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Sixteen}
from RadioButton controls:
The exception doesn't get thrown and application runs but isn't working as intended because there's no converter hooked anymore. I read through all the code but I can't find what is causing this exception. All the references seem fine and it should work, but it doesn't.
Here's the solution with the exception: https://github.com/KulaGGin/MasteringWPF
All the other projects and classes are there because the author is showing how to build a framework and I'm following it.
Upvotes: 1
Views: 3209
Reputation: 17027
Kulagin.Mastering WPF.Converters
is a DLL
In the project Kulagin.Mastering WPF, see in the section Reference, the converters are in another Dll, so you have to reference it, because you are using a converter
it misses the reference to Kulagin.Mastering WPF.Converters
Add it..
Upvotes: 1