Imglogo未声明。由于其保护级别,它可能无法访问。 [英] Imglogo is not declared. It may be inaccessible due to its protection level.

查看:329
本文介绍了Imglogo未声明。由于其保护级别,它可能无法访问。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在wpf项目中



设计视图我正在使用图像控制(imglogo)



in代码背后我使用imglogo对象并传递图像数据。项目运行成功,但一段时间后,我不知道我做了什么,但是当我调试所有项目时,所有设计级别控制对象给出了错误,对于敌人的图像控制,它给出了ImgLogo未被声明。它可能无法访问,因为它的保护级别。

标签控件给出错误lblCompanyName未声明。由于其保护级别可能无法访问



my设计级别的所有控制都存在,但它背后的代码会出错。



我尝试过的事情:



不知道我这么多次重建,清理然后调试项目但它给出了同样的错误

in wpf project

design view i am using image control(imglogo)

and in code behind i am used the imglogo object and pass the image data. project run successfully but after a some time i dont know what i am done but when i am debugging the all project the all design level controls object gives errors loke foe image control it gives the "ImgLogo is not declared. it may be inaccessible due to its protection level."
for label controls gives error "lblCompanyName is not declared. it may inaccessible due to its protection level"

my all control in design level is present but code behind it gives error .

What I have tried:

don't know i am so many times rebuild,clean and then debug the project but it gives same error

推荐答案

你在用一个不是 Window 的基类?



绑定到控件的对象 public 使用公共设置方法?



您确定所需的参考资料在项目中实施了吗?



我们只能做一些 ss猜测,因为你的问题太模糊了。
Are you using a base class that isn't Window?

Is the object bound to the control public with a public set method?

Are you sure the required references are implemented in the project?

We can only make wild-ass guesses because your question is too vague.


这篇关于Imglogo未声明。由于其保护级别,它可能无法访问。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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