I have a project called "xx". I create a folder "images" that has this path: xx \ Bin \ Debug \ Images \
images contain only one photograph, this is the name "1.jpg", MainWindow contains Image control; I installed this code to download the image source, but it does not work why ??:
private void Image_MouseDown(object sender, MouseButtonEventArgs e)
{
Image i = sender as Image; ;
BitmapImage b = new BitmapImage(new Uri(@"images\1.jpg",UriKind.Relative));
i.Source=b;
}
How to download the image source code by code? Thanks in advance.
source
share