Click here to Skip to main content
15,912,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to set Image.sourse from mu resourse that is in my project

pbstuImage.Source="image from resourses of project"
Posted
Comments
stibee 2-Jul-13 4:07am    
Maybe this will help you
http://weblogs.asp.net/monikadyrda/archive/2008/12/13/wpf-imagesource.aspx

Thanks For Every One Answer me on see it !!!
I Solved it is like this:
BitmapImage sourse=new BitmapImage(new Uri(@"Resourse/images.jpg", UriKind.Relative));
  pbstuImage.Source = sourse;
 
Share this answer
 
System.Resources.ResourceManager resMng = null;
System.Drawing.Bitmap sourceImage = null;

resMng = new System.Resources.ResourceManager("NameSpaceName.ImageResource", typeof(NameSpaceName.ImageResource).Assembly);

sourceImage = resMng.GetObject(strings[0]) as System.Drawing.Bitmap;
 
Share this answer
 

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



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