![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
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.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| 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 Specs![]() |
| | #2 (permalink) |
| 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 Specs![]() |
| | #3 (permalink) |
| 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 Specs![]() |
| | #4 (permalink) |
| 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 Specs![]() |
| | #5 (permalink) |
| 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 Specs![]() |
![]() |
| 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 |