I am setting different text to a textblock depending on what control has been selected as a way of providing help for the user.
What I would like to do is in the code behind file, when one control is selected, provide a brief explanation in text, then provide a link to a text file within that textblock.
It might look like, for example “Your choice should be a car manufacturer. Click here to see a list”
I was trying to do it with a hyperlink but i’m not having much luck.
Anyone know how to do it?
Use the TextBlock.Inlines collection and add a Hyperlink:
XAML:
Code:
To display the text file, you could use Process.Start to launch an external viewer (e.g. Notepad), or you could use File.ReadAllText to read it in, and then display it in a TextBlock or whatever within your app.