Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 565367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:51:53+00:00 2026-05-13T12:51:53+00:00

I am setting different text to a textblock depending on what control has been

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:51:53+00:00Added an answer on May 13, 2026 at 12:51 pm

    Use the TextBlock.Inlines collection and add a Hyperlink:

    XAML:

    <TextBlock Name="hintInfo" />
    

    Code:

    Hyperlink hlink = new Hyperlink(new Run("here"));
    hlink.Click += SomeEventHandler;  // event handler to open text file
    
    hintInfo.Inlines.Clear();
    hintInfo.Inlines.Add("Click ");
    hintInfo.Inlines.Add(hlink);
    hintInfo.Inlines.Add(" to see more info.");
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Setting up a Windows based web application on Amazon's cloud has definitely been a
In SQL, how do update a table, setting a column to a different value
Is it possible to set multiple styles for different pieces of text inside a
When setting the source of an items control (ComboBox, for example), is it possible
Suppose you have a text file like: my_setting = ON some_method = METHOD_A verbosity
I have a simple user control, which is essentially just an AutoCompleteBox with some
StateListDrawables and <selector> are great for setting different drawables for each state of a
I'm upgrading an app with many different settings files from XP to Vista and
I have a web service that needs different settings for different environments (debug, test,
Could you explain the difference between setting methods in the constructor and through prototype

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.