Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do WPF hyperlinks only work in pages?

Tags:

hyperlink

wpf

I'm new to the Hyperlink control. I wish to have a hyperlink in a regular WPF window which will navigate to a URL by opening the standard browser. I have added the hyperlink, but it does nothing.

Before I implement a handler to do the work myself, can anyone please confirm that the Hyperlink control will navigate only within pages?

like image 639
Tor Haugen Avatar asked Oct 20 '09 12:10

Tor Haugen


1 Answers

You will need to do it yourself.

The simplest way to do it is to handle the Hyperlink.RequestNavigate event and call Process.Start with the URL. (This will open the default browser).

like image 140
SLaks Avatar answered Oct 08 '22 15:10

SLaks