how to set verticalalignment in Rich textbox

 ̄綄美尐妖づ 提交于 2019-12-13 05:59:35

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!