Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

Hyperlink doesn't respond to clicks?

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 03-18-2006   #1 (permalink)
Chris Sammis
Guest


 

Hyperlink doesn't respond to clicks?

Using the Feb. CTP:

A component of my application converts HTML coming in from a socket to XAML
using a series of regular expressions, and calls the XamlReader.Load(string)
method to turn the XAML into a Paragraph object, which is then inserted into
a RichTextBox.

HTML hyperlinks, <a href="http://url.com">MyUrl</a>, get translated into the
XAML expression <Hyperlink NavigateUri="http://url.com">MyUrl</Hyperlink>. A
full Paragraph might look like: <Paragraph xmlns="..."
xml:space="preserve">Go to this keen site: <Hyperlink NavigateUri="...">My
Site</Hyperlink>!</Paragraph>

The RTB displays everything very nicely, but the hyperlink doesn't behave
"normally." The text color is not the default hyperlink color, although it
is a different color from the rest of the RTB text and is underlined. The
cursor does not change to a "hyperlink" cursor when the user mouses over it.
But most importantly, the hyperlink doesn't respond to clicks at all.
Attempting to circumnavigate this by adding a Click="hyperlink_click" event
handler in the XAML results in the parser throwing an exception, saying that
the XAML must be compiled (and not parsed, I guess?)

Any advice for getting operable hyperlinks?

My System SpecsSystem Spec
Old 03-20-2006   #2 (permalink)
Nick Kramer [MSFT]
Guest


 

Re: Hyperlink doesn't respond to clicks?

Yeah, there's compiled xaml, then there's XamlReader.Load, and the latter
doesn't support events because there's no obvious code to hook them up to.

That doesn't explain why hyperlinks can't be clicked, though, can you send
us a repro file? Thanks.

-Nick Kramer [MSFT]

---
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"Chris Sammis" <ChrisSammis@discussions.microsoft.com> wrote in message
news:B16B336A-5093-4010-B2BC-0AD372ABABDE@microsoft.com...
> Using the Feb. CTP:
>
> A component of my application converts HTML coming in from a socket to
> XAML
> using a series of regular expressions, and calls the
> XamlReader.Load(string)
> method to turn the XAML into a Paragraph object, which is then inserted
> into
> a RichTextBox.
>
> HTML hyperlinks, <a href="http://url.com">MyUrl</a>, get translated into
> the
> XAML expression <Hyperlink NavigateUri="http://url.com">MyUrl</Hyperlink>.
> A
> full Paragraph might look like: <Paragraph xmlns="..."
> xml:space="preserve">Go to this keen site: <Hyperlink NavigateUri="...">My
> Site</Hyperlink>!</Paragraph>
>
> The RTB displays everything very nicely, but the hyperlink doesn't behave
> "normally." The text color is not the default hyperlink color, although
> it
> is a different color from the rest of the RTB text and is underlined. The
> cursor does not change to a "hyperlink" cursor when the user mouses over
> it.
> But most importantly, the hyperlink doesn't respond to clicks at all.
> Attempting to circumnavigate this by adding a Click="hyperlink_click"
> event
> handler in the XAML results in the parser throwing an exception, saying
> that
> the XAML must be compiled (and not parsed, I guess?)
>
> Any advice for getting operable hyperlinks?



My System SpecsSystem Spec
Old 03-20-2006   #3 (permalink)
Chris Sammis
Guest


 

Re: Hyperlink doesn't respond to clicks?

Not a problem - what's the best way to send what you need? It's a bit lengthy
to repost a reproduction in its entirety on the newsgroup.

As a workaround, I came up with the idea of iterating through the
Paragraph's Inline objects looking for hyperlinks and manually attaching a
MouseDown event (Click still doesn't work). This works for the most part,
but iterating through all the top-level inlines doesn't touch every hyperlink
that have been buried in formatting. What's a good way to visit every Inline
in a Block?
My System SpecsSystem Spec
Old 03-21-2006   #4 (permalink)
Ifeanyi Echeruo [MSFT]
Guest


 

Re: Hyperlink doesn't respond to clicks?

Are there any NavigationWindow or Frame elements in the parent chain of the
Hyperlink?
Hyperlink initiates navigation by bubbling a navigation routed event through
its parent chain.
If an element in the parent chain (usually NavigationWindow or Frame)
handles the event then navigation happens otherwise noop.

-- Ifeanyi Echeruo [MSFT]
This posting is provided "AS IS" with no warranties, and confers no rights.

"Chris Sammis" <ChrisSammis@discussions.microsoft.com> wrote in message
news:0D03FFFB-D8DF-46A0-BC00-3FE5656E8E63@microsoft.com...
> Not a problem - what's the best way to send what you need? It's a bit
> lengthy
> to repost a reproduction in its entirety on the newsgroup.
>
> As a workaround, I came up with the idea of iterating through the
> Paragraph's Inline objects looking for hyperlinks and manually attaching a
> MouseDown event (Click still doesn't work). This works for the most part,
> but iterating through all the top-level inlines doesn't touch every
> hyperlink
> that have been buried in formatting. What's a good way to visit every
> Inline
> in a Block?



My System SpecsSystem Spec
Old 03-21-2006   #5 (permalink)
Nick Kramer [MSFT]
Guest


 

Re: Hyperlink doesn't respond to clicks?

Probably best to file on ladybug,
http://lab.msdn.microsoft.com/productfeedback/

In terms of enumerating all hyperlinks, I believe you can do this using
LogicalTreeHelper.

-Nick Kramer [MSFT]

---
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"Chris Sammis" <ChrisSammis@discussions.microsoft.com> wrote in message
news:0D03FFFB-D8DF-46A0-BC00-3FE5656E8E63@microsoft.com...
> Not a problem - what's the best way to send what you need? It's a bit
> lengthy
> to repost a reproduction in its entirety on the newsgroup.
>
> As a workaround, I came up with the idea of iterating through the
> Paragraph's Inline objects looking for hyperlinks and manually attaching a
> MouseDown event (Click still doesn't work). This works for the most part,
> but iterating through all the top-level inlines doesn't touch every
> hyperlink
> that have been buried in formatting. What's a good way to visit every
> Inline
> in a Block?



My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mouse clicks Wes McMaster Vista hardware & devices 1 03-20-2008 04:55 PM
start menu does not respond to clicks cobraman Vista General 1 12-28-2007 12:16 PM
Tip of Pen Right-Clicks instead of Clicking WGSGNUAYHTTE@spammotel.com Vista hardware & devices 4 06-12-2007 09:47 AM
Tip of Pen Right-Clicks instead of Clicking WGSGNUAYHTTE@spammotel.com Vista hardware & devices 0 06-10-2007 02:23 PM
Pasting requires two clicks rodehall Vista General 8 04-13-2007 11:38 AM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51