In general I need a control that will take an Inlines (markup) and is selectable (copy)?
In a TextBlock can highlight / markup
The problem is the text is not selectable (copy) in a TextBlock
In TextBox you can select (copy) but cannot markup (e.g. <Run..></Run>)
Yes you can highlight by range but I need to highlight by markup
Can use a FlowDocument and get both markup and select but the problem is that is too slow for my application. Will live with no select (copy) before we can take the speed hit.
The markup is coming from Lucene and I don't have have ready access to position and I can can only return String (not FlowDocument) as that is the signature of the Interface. Getting around Inlines not bindable with a Converter and XamlReader (something like this).
Basically I need the following markup up text (Inlines) to be selectable
(and be String - not FlowDocument)
<TextBlock TextWrapping="Wrap">
ignore me the is /r/n \r\n Environment.Newline
<LineBreak/>
line 2
<LineBreak/>
<Run Background="Yellow">highlight</Run>
</TextBlock>
Before you answer use a ReadOnly TextBox that will not work.
Cannot use markup (e.g. <Run..></Run>)
in a TextBox.