i have a project it's name is 'xx'.
i create a folder "images" that have this path :
xx\bin\Debug\images\
images contain only one photo it's name is "1.jpg"
the MainWindow contain Image control
i set this code to load the image source but it doesn't 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 can I load the Image source by code ??
Thanks in advance

New Topic/Question
Reply




MultiQuote




|