在WPF形象问题(图像不显示) [英] image problem in wpf (image does not show up)

查看:177
本文介绍了在WPF形象问题(图像不显示)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不明白为什么我不能在WPF显示图像。也许我修改了我的资源文件夹意外,这就是为什么我没有得到展示的原因。所以我创建了一个新的WPF应用程序,我有这样的:

I don't understand why I cannot display an image in WPF. Maybe I modified my resources folder accidentally and that is the reason why I does not get displayed. So I created a new wpf application and I have this:

当我运行程序我的图片被显示为:

and when I run the program my picture gets displayed as:

< IMG SRC =http://i.stack.imgur.com/Q2AWb.pngALT =在这里输入的形象描述>

为什么当我尝试做同样的事情在我的节目图像显示不出来!?

Why is it that when I try doing the same thing in my program the image does not show up!?

请注意如何当我运行的程序没有图像...

note how when I run the program there is no image...

在我的其他应用程序,我刚才拖动图像控制我的主要窗口,然后我浏览了我的电脑上随机图像,当我遵守并运行它,它工作正常。 ?为什么我不能做同样的,我使用的应用程序

In my other application I just dragged the image control to my main window and then I browsed for a random image on my computer and when I complied and run it it works fine. Why is it that I cannot do the same with the application that I am working with?

编辑:

与它的工作原理一些图像,并与他人不是!为什么?

with some images it works and with others it does not! why?

一起来看看:

当我编译和运行一个图像显示不出来!

and when I compile and run one image does not show up!

和也看一看,看看这些文件是如何具有相同的属性。

and also take a look and see how the files have the same properties.

设置:

设置为MOV图片:

推荐答案

我解决它,我不明白为什么它的工作原理。我需要添加这些信息对我的工作sqllite连接。我只是评论了这一点:

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:

和它的工作。也许这是我应该报告sqllite的错误,因为在那里建立与Visual Studio连接时添加这些行。

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.

这篇关于在WPF形象问题(图像不显示)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆