问题
please teach me the way to set vertical alignment in Rich textbox
i found out how to set horizen alignment in rich textbox
[Sample code]
richTextBox1.SelectionAlignment = HorizontalAlignment.Center
but it is not vertical alignment
i really wanna answer it from everyone
回答1:
Flow document are designed to optimize viewing and readability. Rather than being set to one predefined layout, flow documents dynamically adjust and reflow their content based on tun-time variables such as window size, device resolution, and optional user preferences.
So, we cannot set the layout of the document in the RichTextBox manually, but for the paragraph, we can set the TextAlignment property. And you can also try to set the Padding property for the RichTextBox to adjust it content.
Hope this helps.
-- Kevin Pan
SOURCE LINK
来源:https://stackoverflow.com/questions/11302702/how-to-set-verticalalignment-in-rich-textbox