image problem in wpf (image does not show up)

不想你离开。 提交于 2019-12-04 08:42:30

Chances are the Image does not have the Build Action set to Resource. If it's anything else, including Embedded Resource, then it will not display properly at runtime.

Other things you can check are the the resolution of the image. In Paint, you'd use File>Properties to view the resolution.

Try saving as a different format, such as jpg. If that works, then it's likely a problem with your file.

You may need to clean and rebuild your solution as well.

I fix it and I don't understand why it works. I need to add this information for my sqllite connection to work. I just had to comment this out:

and it worked. Maybe this is a bug of sqllite that I should report because those lines where added when creating the connection with visual studio.

.BMP Image format is not supported. I had the same issue but after converting the image to .jpeg format it worked properly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!