Hello,
I'm building simple dictionary application using WPF.
I'm using MVVM pattern, databinding and FlowDocument to display words to user.
UI consists of 2 controls: ListBox and FlowDocumentScrollViewer.
Dictionary data comes from XML file, format of this string may look like this
<b>Word</b> - Some description. Another <i>description</i>. Reference <ref id="123">related word</ref>
The order of HTML and reference elements is not defined.
I parse HTML string, make it into XAML, then from XAML I create FlowDocument object and bind it to Document property of FlowDocumentScrollViewer control.
The problem arises when I need to link ref. elements. (my requirement is when user clicks on reference link, referenced word is selected in ListBox control and shown in FlowDocumentScrollViewer)
My question is there a way to dynamically create "hyperlink"-style controls (with event or commands attached) that would take user to referenced word in dictionary.
Is it possible to solve this problem at all?