My Softwares

My Softwares

  • NA
  • 1
  • 536

How to give image path of image control from root folder.

Jul 14 2016 12:04 PM

 My current image path code in wpf is
 
image1.Source = new BitmapImage(new Uri(@"D:\My Work\Programming\wpf\Number Generator\Number Generator\Images\1.png"));
 
i want to give path as
 
image1.Source = new BitmapImage(new Uri("Images\1.png"));
 
how it is possible , please tell me if anyone can.

Answers (2)