If your HTMLToXaml conversion logic is working, and if your DataContext is set correctly, then the problem would be that you're not affecting the text to your RichTextBox, setting the DataContext is not enough, you should do :
<ScrollViewer VerticalScrollBarVisibility="Auto">
<RichTextBlock>
<RichTextBlock.DataContext>
{Binding Content}
</RichTextBlock.DataContext>
<FlowDocument>
<Paragraph>
<!--your content should be here-->
</Paragraph>
</FlowDocument>
</RichTextBlock>
</ScrollViewer>
You can put many Paragraphs as you wish, they just need to be inside a FlowDocument
, hence you should extract each paragraph's value from the item.Content and add it as a paragraph to the FlowDocument :
Paragraph myParagraph = new Paragraph();
myParagraph.Inlines.Add(ParagraphValueFromItemContent);
// Add the paragraph to the FlowDocument.
myFlowDoc.Blocks.Add(myParagraph);