Want to build the ChatGPT based Apps? Start here
Become a member
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
C# Corner Home
Technologies
Monthly Leaders
ASK A QUESTION
Forum guidelines
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
();
bi3
.
BeginInit
();
bi3
.
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
)));
bi3
.
CacheOption
=
BitmapCacheOption
.
OnLoad
;
bi3
.
EndInit
();
}
Reply
Answers (
0
)
WPF Datagrid Paging in User Control
WPF how to make all rows and colums editable in datagrid