I need to add several hyperlinks to the program’s form dynamically at runtime (and handle user clicks on them).
How to do this?
I tried something like:
var hlink = new Hyperlink();
myStackPanel.Children.Add(hlink);
but hyperlink is not a UIElement…
Thanks!
It’s a little bit kludgy, but you need to do this:
This will make a new label with the text “Google”, the Uri “http://www.google.com“, and when clicked it will open the Uri in the user’s default browser.