Brandon Greene

Brandon Greene

  • 2.2k
  • 1
  • 987

Creating a picture from a web page

Aug 24 2014 1:42 PM
What I'm trying to do is have a person click on a button that links them to a website of their choice and once they get to that website to create a image of what is displayed on that website. When I run the program I receive no errors but the image is not displayed. I tried to display the image in the and now I'm trying in but it's still not working. Any help would be appreciated I just picked up WPF.
Here is a example of my code.

private void btnSnap_Click(object sender, RoutedEventArgs e)


WebPicture.Height = 500;

WebPicture.Width = 500;

ImageBrush myBrush = new ImageBrush();

Image image = new Image();

BitmapImage bi3 = new BitmapImage();
.UriSource = new Uri("http://" + websearch.Text, UriKind.RelativeOrAbsolute); WebPicture.Source = new BitmapImage(new Uri("http://" + websearch.Text, UriKind.RelativeOrAbsolute));

ImageBorder.Background = new ImageBrush(new BitmapImage(new Uri("http://" + websearch.Text, UriKind.RelativeOrAbsolute)));
.CacheOption = BitmapCacheOption.OnLoad;
.EndInit(); }