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

  • Home
  • SEARCH
  • 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 6122971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:57:41+00:00 2026-05-23T15:57:41+00:00

RTM version of the developer tools. I am building an app. In parts of

  • 0

RTM version of the developer tools.

I am building an app. In parts of the app I have some text provided by a web service, I take this text and process it to make the URLs in the text act as hyperlinks.

The container for this is a wrap panel.

<wrap:WrapPanel x:Name="PostMessage2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>

Then in the constructor of the page I have this simple code.

PostMessage2.Children.Add(new HyperlinkButton()
    {
         Content = new TextBlock()
         {
             Text = "test url",
             Foreground = new SolidColorBrush(Colors.White)
         },
         NavigateUri = new Uri("http://www.google.com/")
    });

(I know this code is will not open an IE session and navigate to the Url)

Now when I run this program, I will not see anything visible on the screen, but if I tap the screen where the start of the url should be, then it will try to navigate to the url (which causes an exception as the navigation isn’t handled correctly).

If I add a Textblock before and after the URL the test in those blocks is visible, and they will be separated by approximately 3 spaces, which if you tap the middle of this it will try to navigate to the url.

So my question is why are the hyper-links not visible but they are active as you can tap them, am I missing some obvious property or setting?

Thanks in advance for help.

  • 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-23T15:57:41+00:00Added an answer on May 23, 2026 at 3:57 pm

    You don’t need to set the Content of the HyperlinkButton to be a TextBlock. It’s expecting a string and you can set the Foreground color on the HLB:

    PostMessage2.Children.Add(new HyperlinkButton()
        {
             Content = "test url",
             Foreground = new SolidColorBrush(Colors.White),
             NavigateUri = new Uri("http://www.google.com/")
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a web app based on MVC3 (no beta or release candidate, RTM/RTW
I have VS2010 Premium RTM version on Windows 7 Ultimate x64 . In the
I have HTC Trophy with build 7.0.7004.0 - RTM version, unlocked for development. Now
I believe I have set up our MVC app to use [HandleError] properly. This
Any application I create in the RTM version of the Windows Phone 7 tools
I have a web application and whenever I load it in VS 2010 RTM,
I have a web app that reads data from a SQL DB that contains
I upgraded to MVC2 RTM with VS2010 RC and some of my ViewUserControl and
I have Visual Studio Team System 2008 RTM and .NET Framework 3.5 SP1. When
I am using VS 2010 RTM and trying to perform some basic validation on

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.