c# - RichTextBox Hyperlink color in Windows Phone -


Text after "div class =" itemprop = "text">

I think there is an application that displays some text in a RichTextBox, there are some links in my text, so they Use hyperlink to display

My problem is that I set a color for the property hyperlink foreground Can not get it. I know that this can not pass it through the RichTextBox.Xaml property; In addition, if I

  & lt; RichTextBox.Resources & gt; & Lt; Style TargetType = "Hyperlink" x: Key = "HyperlinkColor" & gt; & Lt; Setter property = "foreground" value = "black" /> & Lt; / Style & gt; & Lt; /RichTextBox.Resources>  

Nothing happens:. Hyperlink stuck with default color

There is a way to color in my RichTextBox I want on the hyperlink

You can:

  & lt; RichTextBox & gt; & Lt; RichTextBox.Resources & gt; & Lt; Solid Coiler brush x: key = "hyperlinkcolorbrush" color = "white" /> & Lt; /RichTextBox.Resources> & Lt; Paragraph & gt; & Lt; Hyperlink foreground = "{static resource hyperlink collar brush}" & gt; Hello! & Lt; / Hyperlink & gt; & Lt; / Paragraph & gt; & Lt; Paragraph & gt; & Lt; Hyperlink foreground = "{static resource hyperlink collar brush}" & gt; How are you? & Lt; / Hyperlink & gt; & Lt; / Paragraph & gt; & Lt; / RichTextBox & gt;  

or

CS:

  string XAML = @ "from & lt; stream xmlns = "Http://schemas.microsoft.com/winfx/2006/xaml/presentation""gt;  gt; & lt; hyperlink foreground =" "green" "& gt; hyperlink & lt; / Hyperlink & gt; & lt; / para & gt; & lt; / section & gt; "; RichTextBox.Xaml = xaml;  

I hope this helps :)


Comments