Answer the question
In order to leave comments, you need to log in
Why does the program not find the resource?
Hello!
I added a picture resource through the project properties.
But this code throws an error:
Unhandled exception of type 'System.IO.IOException' in PresentationFramework.dll
Additional information: Could not find resource 'img1.jpg'.
Can you please tell me how to fix this error?
I don't use xaml file in my project.
Uri uri = new Uri("pack://application:,,/img1.jpg");
BitmapImage bitmap = new BitmapImage(uri);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question