Tek Mun
Tek Mun

Reputation: 99

Xamarin.UWP RichTextBlock Hanging Indentation

I used custom renderer to display a Label as RichTextBlock. Using Paragraph, there is a TextIndentProperty to indent first line. However, I also need "Hanging Indentation" found in RichEditBox or SetIndent found in ITextParagraphFormat.

Is there a way to implemnent "Hanging Indentation" in RichTextBlock?

Upvotes: 0

Views: 80

Answers (1)

Tek Mun
Tek Mun

Reputation: 99

I have found the solution to this question. Use left-padding to shift the entire paragraph in (say 10px) Then, use text-indent with negative value to shift the first line of the paragraph out again (say -10px). With this method, a hanging indentation can be achieved.

Upvotes: 0

Related Questions