mscommunity.net

Interactive mscommunity.net online activities
Signed in as anonymous | Edit Profile | Sign out | Help
in Search

Weblog :: Boris Ševo

Sporadic posts about my interests, e.g. software development (mostly .NET), technology in general and some occasional rant.

WPF trick #1 - Hyperlink control

Today I needed to create a simple grid which will hold some text information about some products and a few Hyperlink controls which when clicked need to display detailed information about particular product. On my big surprise WPF doesn't have Hyperlink control. This is really weird, but the solution is very simple. All you need to do is to use System.Windows.Documents.Hyperlink in a combination with TextBlock control.

XAML code for creating Hyperlink 'control' is then something like this:

    
    <TextBlock>
        <Hyperlink>
            <TextBlock Text="Some text">
        </Hyperlink>
    </TextBlock>
Published lis 21 2008, 10:13 by boris.sevo
Filed under:

Comments

 

anonymous said:

It does actually.

srpanj 30, 2009 3:59
 

anonymous said:

<TextBlock><Hyperlink>Click here...</Hyperlink></TextBlock>

studeni 9, 2009 1:12

Leave a Comment

(required) 
(optional)
(required) 
Submit
Powered by Community Server (Commercial Edition), by Telligent Systems