Wednesday, April 09, 2008 10:05 PM rrobbins

Disgusted With Silverlight

Today I worked on a Twitter client in Silverlight. I got pretty far on this project but had some problems creating hyperlinks in the text. I tried the Hyperlink tag in the XAML Pad and it worked there but it would not work in my Silverlight project. I did some research on the Internet and found a web page with a hyperlink example. Incredibly, this example would have you handle all the mouse events and even the text decoration to make a TextBlock act like a hyperlink. This web page also directs you to "See the documentation for TextDecorations property of the TextBlock object in the Silverlight SDK".

http://www.silverlight.net/quickstarts/silverlight10/controls.aspx

So I check out that help topic in the Silverlight SDK and find the example for "Simulating a Hyperlink using the TextDecorations Property". WTF!! I could not believe this. You mean the technology that is supposed to revolutionize the Internet with rich client web applications can't even create a simple hyperlink? I have to go to this much trouble just to simulate a hyperlink? Unbelievable!

Well...I was going to put what I managed to get working on my web site, without hyperlinks, but I cannot open the project in Visual Studio 2005. I could open the project at work but not at home. When I try to open the web page without using Visual Studio I just get a lot of errors.

OK I've managed to deploy it on my web site but don't be surprised if it throws up some errors:

http://www.williamsportwebdeveloper.com/Silverlight-Twitter.html

Silverlight is definitely proving to be far more trouble than it is worth.

Filed under: , ,

Comments

# re: Disgusted With Silverlight

Wednesday, April 09, 2008 11:53 PM by ScottGu

Try using the Silverlight "HyperlinkButton" control:

       <HyperlinkButton NavigateUri="http://www.asp.net" TextDecorations="Underline" Content="Push Me"/>

This handles the click event and navigation for you.

Scott

# re: Disgusted With Silverlight

Sunday, April 27, 2008 2:41 AM by Paul

HyperlinkButton is not available in Silverlight 1.0. I agree that Silverlight is pretty ridiculous as far as 1.0 goes.

# re: Disgusted With Silverlight

Friday, August 01, 2008 6:14 AM by diego riccardi

thank you very much

These contents are very complete.

You gave me a very good help.

I send you my @mail

di.ric@tin.it

# re: Disgusted With Silverlight

Wednesday, March 25, 2009 8:27 AM by CombatDave

You're referencing the inability to include hyperlinks in line with a textblock eh? I think this is pretty ridiculous too. I found some examples stacking textblock and hyperlinkbutton elements in a horizontally oriented stackpanel, but I still get odd spacing and am required to build relatively complex xaml in order to emulate a simple paragraph of text with hyperlinks and images.

Leave a Comment

(required) 
(required) 
(optional)
(required)