I am trying to set the WPF image source from an internet link. How can i do this? I tried this but it does not work:
Image image1 = new Image(); BitmapImage bi3 = new BitmapImage(); bi3.BeginInit(); bi3.UriSource = new Uri("link" + textBox2.Text + ".png", UriKind.Relative); bi3.CacheOption = BitmapCacheOption.OnLoad; bi3.EndInit();
source share