I ended up using the package available for gitHub , which converts from HTML to RickTextBlock.
Basically, you need to open the package manager console (Tools> Library Package Manager> Package Manager Console) and install the package under Install-Package RichTextBlock.Html2Xaml .
Then you open RichTextBlockProperties.cs and you have the lines you need to copy. In my case, I had to add a namespace:
xmlns:rtbx="using:EventTests.Common"
And then you can associate your property with HTML using:
<RichTextBlock rtbx:Properties.Html="{Binding ...}"/>
Some problems and some solutions.
The problem I found in this library is how it handles plain html without a div. How:
<p>Testing <i>italic</i> and something more.</p> <p>More testing </p>
Fingerprints:
Italics testing and more.
More testing
However, I wanted something like this:
Italics testing and more.
Additional tests
So I had to wrap the second paragraph in a div (and all paragraphs except the first can be wrapped).
<p>Testing <i>italic</i> and something more.</p> <div><p>More testing </p></div>
If you complete the first paragraph, you will have a new line.
So far this is the best solution I have found. If you find that I rate it better, as I test and study. If you find a better solution, I will accept yours.
be careful
This approach will work if you have characters like "<" or "&" in your html. I suggest you replace these characters before trying to use this library.