Hyperlink in a RichTextBox - no ToolTip?

Quick question: When I set the ToolTip property on a Hyperlink that is then embedded into a RichTextBox, hovering the mouse over the hyperlink doesn't display the tooltip*. Why is this, and how can I make the tooltip appear properly?

* For that matter, clicks are not correctly interpreted by the Hyperlink either, I have to programmatically attach a MouseDown handler to deal with launching the link's NavigateUri

[424 byte] By [csammis] at [2007-12-21]
# 1

Hyperlink is not enabled in the RichTextBox. Also tooltips of inline level elements are not supported.

You could get the ToolTip if a FlowDocumentReader is used

HTH

lester-MSFT at 2007-9-10 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...
# 2
lester - MSFT wrote:

Hyperlink is not enabled in the RichTextBox. Also tooltips of inline level elements are not supported.

You could get the ToolTip if a FlowDocumentReader is used

HTH

Well that explains what's happening. Can the Hyperlink be enabled in the RTB, and if so, how?

I don't know that it's entirely true that inline-level elements can't have tooltips, because I can do something like this:

TextBlock tb = new TextBlock(hyperlink); // TextBlock(Inline) constructor

and the tooltip embedded in the Hyperlink will display an attached tooltip.

Can you elaborate on the FlowDocumentReader method of finding and displaying a tooltip?

csammis at 2007-9-10 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...
# 3

As mentioned earlier, the Inline elements tooltip should not show up. This is the behavior you will see in the next released bits.

Hyperlinks cannot be enabled in RichTextBox as of now.

If you want to see the tooltips then you would have to place the content in a reader like the FlowDocumentReader. Editing is not possible in this scenario

<FlowDocumentReader xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
<FlowDocument>

</FlowDocument>
</FlowDocumentReader >

lester-MSFT at 2007-9-10 > top of Msdn Tech,Visual Studio Orcas,Windows Presentation Foundation (WPF)...

Visual Studio Orcas

Site Classified