0

I have a image in the current project, to access it, I use the absolute path, like myBitmapImage.UriSource = new Uri(@"F:\jcnu\DisplayDemo1_c#_CircleBased\Display1\120px-Arrow_Blue_Right_001.png"); Now I want to give the relative path so that I can move this application to any other path.

I can place the image to any sub-folder of the project so consider this as well. Thanks in advance.

kdopen
  • 8,032
  • 7
  • 44
  • 52
vasu
  • 79
  • 5
  • http://stackoverflow.com/questions/6511816/loading-image-from-relative-path-in-windows-forms – Magnus Jun 02 '15 at 20:22
  • use this - AppDomain.CurrentDomain.BaseDirectory in your Uri - it points on folder where is application installed – Martin Ch Jun 02 '15 at 20:22

0 Answers0