Click here to Skip to main content
15,888,579 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Updated 29-Jun-18 1:44am
Comments
[no name] 29-Jun-18 7:00am    
Can you show your code?
Richard MacCutchan 29-Jun-18 7:16am    
Check that you have not misspelled something so the variables are not available.
ketan Ram Patil 29-Jun-18 7:24am    
no actually my project having so many windows and each window having many controls and i am getting all windows controls same error behind code :(
Eric Lynch 29-Jun-18 9:00am    
You're really not providing enough information to help effectively. That said, I do notice one discrepancy within your question. In some places, you mention "imglogo" and in the error we see "ImgLogo". C# is a case-sensitive language, so these two are NOT the same thing. Are you maybe mixing up the case someplace in your code?

1 solution

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.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900