Hey guys is there a way I can set the URL ... the one below
System.Windows.Controls.Image ch = new System.Windows.Controls.Image();
ch.Source = new BitmapImage(new Uri(@"C:\Users\Shadow\Desktop\crosshare.png"));
For multiple machines, because as it is it just works on my pc.
Is there a way I can do it to get it from the Resources Folder?
For ex. Properties.Resources.Pic1.png
Thanks,
TheFreeman
3 Replies - 1937 Views - Last Post: 29 April 2012 - 05:57 AM
Replies To: BitmapImage URL need to set for multiple machines
#2
Re: BitmapImage URL need to set for multiple machines
Posted 26 April 2012 - 08:35 AM
Of course it only works on your PC....you are mapping directly to your desktop. Your desktop doesn't exist on other PCs.
Yes, you can do this. Simply add the image to the project, then use code like this..
Untested, but it should work.
Yes, you can do this. Simply add the image to the project, then use code like this..
// image was added to an Images folder in the project
BitmapImage image = new BitmapImage(new Uri("/Images/crosshare.png", UriKind.Relative));
Untested, but it should work.
#3
Re: BitmapImage URL need to set for multiple machines
Posted 26 April 2012 - 11:42 AM
Quote
crosshare.png
Is that a pic of an angry rabbit??
#4
Re: BitmapImage URL need to set for multiple machines
Posted 29 April 2012 - 05:57 AM
Hey guys sorry for the late reply 
Thanks for the help m8 appreciated =)
Thanks,
TheFreeman
Thanks for the help m8 appreciated =)
Thanks,
TheFreeman
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|