0

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?

Tek Mun
  • 97
  • 9
  • It is impossible that implement *Hanging Indentation* with `RichTextBlock`. As you can see [`Paragraph`](https://learn.microsoft.com/en-us/uwp/api/windows.ui.xaml.documents.paragraph) class only has [`TextIndent`](https://learn.microsoft.com/en-us/uwp/api/windows.ui.xaml.documents.paragraph.textindent#Windows_UI_Xaml_Documents_Paragraph_TextIndent) property that used to set the indentation of the first line of text in a paragraph, it could not other line. – Nico Zhu Nov 30 '18 at 07:55
  • After plowing through the documentation, I guess it is impossible. If I switch to RichEditBox (which support ITextDocument that supports Hanging Indentation), I cannot enter my Paragraph class. Do you have any suggestion? – Tek Mun Nov 30 '18 at 14:05

1 Answers1

0

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.

Tek Mun
  • 97
  • 9