how to set image Source in the code C#
myImage.Source = new BitmapImage(new Uri(@"/Images/foo.png", UriKind.Relative));
how to set image Source in the code C#
myImage.Source = new BitmapImage(new Uri(@"/Images/foo.png", UriKind.Relative));
c# display image
// open file dialog
OpenFileDialog open = new OpenFileDialog();
// image filters
open.Filter = "Image Files(*.jpg; *.jpeg; *.gif; *.bmp)|*.jpg; *.jpeg; *.gif; *.bmp";
if (open.ShowDialog() == DialogResult.OK) {
// display image in picture box
pictureBox1.Image = new Bitmap(open.FileName);
// image file path
textBox1.Text = open.FileName;
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us