UWP: Better use XAML's RichTextBlock than a TextBox for neat rendering of text?

I wanted to disaply in my app a somewhat large amount of text contained in three paragaphs. Using a textbox with wrapping and scrolling did show all the text. However, as displayed text it was not satisfactory. Using 'paragraphs' inside 'RichTextBlock' provided the best option.

The XAML code shows a TextBox and a RichTextBlock with three 'Paragraph' controls. Both of them inside a 'ScrollViewer' which makes it easy to scroll the text as shown.



Here is the code for the MainPage.XAML



This is the result rendered in the Local Machine.

This one rendered to an emulator (4")



Comments

Popular posts from this blog

Event Code: UI design with XAML in Visual Studio 2017 - 2

Deploying a Universal Windows Project to Lumia 950

UWP: Displaying formatted text in a TextBox Control