Skip to main content

Microsoft Silverlight

Answered Question Where is anchor tag in silverlight 3RSS Feed

(0)

Dhev
Dhev

Member

Member

12 points

38 Posts

Where is anchor tag in silverlight 3

Hello Experts,

I'm new to silverlight and creating a website. I need to insert a external URL. In asp.net, I go with anchor tag and did my process. What will I in Silverlight?

 

Thanks in Advance

Dhev

Dhev
Dhev

Member

Member

12 points

38 Posts

Re: Re: Where is anchor tag in silverlight 3

Thank You for your quick reply.

I don't want hyperlink button. It means , I clik and open a particular page.

I want to show current stock exchange position. Just like www.nseindia.com .

Thanks in Advance

tanmoy.r
tanmoy.r

Contributor

Contributor

3594 points

710 Posts

Re: Re: Re: Where is anchor tag in silverlight 3

Hi Dhev, Do you want something that looks like a hyperlink but function like a button? You still can use HyperlinkButton class and handle the logic in clicked event as you want. Silverlight does not support html elements directly so you can not use "a" tag directly.

Please Mark as Answer if this helps you.
Thanks n Regards
~Tanmoy
Blog: http://anothersilverlight.blogspot.com/

Dhev
Dhev

Member

Member

12 points

38 Posts

Re: Re: Re: Where is anchor tag in silverlight 3

Thanks Tanmoy....

I couldn't do it. Can you send me any samples

Min-Hong Tang - MSFT
Min-Hong...

Contributor

Contributor

3619 points

412 Posts

Re: Re: Where is anchor tag in silverlight 3

Hi,

   Em, based on my understanding, you are trying to get the hyperlink look and feel , but you do not want to navigate, is that right? 

   Then seems to me a hyperlinkbutton will do your trick.

   xaml:

   <HyperlinkButton Click="HyperlinkButton_Click" Content="www.microsoft.com"></HyperlinkButton>

   CodeBehind:

        private void HyperlinkButton_Click(object sender, RoutedEventArgs e)
        {

            // do your staff 

       }

    You just simply do not tell the button where to . It will not navigate or open a new page.

    And for further informations you can check the link Ken provided you.

Best Regards

Min-Hong Tang
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help.

hsampat
hsampat

Member

Member

8 points

4 Posts

Re: Where is anchor tag in silverlight 3

If you want to navigate to external URL, you can to do it as :

<HyperlinkButton Content="Silverlight Home Page"
 NavigateUri="http://www.silverlight.net" TargetName="_blank"/>

This will open external web page in a new blank window.

Dhev
Dhev

Member

Member

12 points

38 Posts

Answered Question

Re: Re: Where is anchor tag in silverlight 3

Thanks for your contribution for my question.

I got an answer from http://www.divil.co.uk/silverlight/tools.aspx .

It helps me a lot

Thanks who are all posted for my question.

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities