Answer the question
In order to leave comments, you need to log in
How to change image on WPF form?
Good afternoon, comrades!
I have an image on a WPF form
<Image x:Name="MainImage" Source="C:\temp\test.jpg" HorizontalAlignment="Left" Height="300" Width="450" VerticalAlignment="Top" />
Uri uri = new Uri(@"C:\temp\IMG_0690.JPG", UriKind.Relative);
ImageSource imgSource = new BitmapImage(uri);
MainImage.Source = imgSource;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question