I have a little problem. I would like to add an image from a folder to a project so that I don't have a mess in the project. The images that I have directly in the project not in the folder . Do you know what to do? I want to change the images after clicking the button, that's why I want more images there
My code where I want change Images, it works with Images inside project
public void ChangeImg(Uri resourceUri,Image image)
{
StreamResourceInfo streamInfo =
Application.GetResourceStream(resourceUri);
BitmapFrame temp = BitmapFrame.Create(streamInfo.Stream);
var brush = new ImageBrush();
brush.ImageSource = temp;
image.Source = brush.ImageSource;
}
private void Button_Click(object sender, RoutedEventArgs e)
{
ChangeImg(new Uri("images/timetable_Unselected.png",
UriKind.Relative), img_Home_Unselected);
}
