UWP: How do I set the default tab size for a RichTextBlock?

75 Views Asked by At

I have a RichTextBlock in UWP.

I need to configure how much space a tab is going to take: this is basically the same concept of the iOS primitive "defaultTabInterval": https://developer.apple.com/documentation/uikit/nsmutableparagraphstyle/1529861-defaulttabinterval?language=objc

How do I achieve this goal in UWP?

1

There are 1 best solutions below

0
On

In UWP, there is no API that can set the width of Tab (\t) independently.

As a workaround, you can try replacing all \t with more controllable spaces before assigning Text to RichTextBlock.

Best regards.