I found a bug in WPF XAML when specifying an icon for a XAML Window, trying to run the program generates an error message on the line:
System.Windows.Application.LoadComponent(Me, resourceLocater)
XamlParseException occurred
Provide value on 'System.Windows.Baml2006.TypeConverterMarkupExtension' threw an exception.' Line number '5' and line position '100'.
I've set the icon to Always Create on the Copy To Output Directory with no luck.
I changed the icon from Resource to EmbeddedResource - no luck there either.
I added it to the Resources for the project - still no luck.
I've verified the file and its location 100%.
The XAML of the window is correct, the name is correct, the path is correct.
Icon="Resources/VisualizerIcon.ico"
Stumped - online forums say to Copy to output Directory is the solution, but, after building the solution, only the Folder is copied over (even though I explicitly set the ICO file to be copied).
Anyone?
You just need to set the build action for the actual image/icon to Resource as shown in the properties window..

I know it's an old post, just wanted to share a dummy error..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With