如何在富文本框中设置垂直对齐 [英] how to set verticalalignment in Rich textbox

查看:58
本文介绍了如何在富文本框中设置垂直对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请教我如何在富文本框中设置垂直对齐方式

please teach me the way to set vertical alignment in Rich textbox

我发现了如何在富文本框中设置水平对齐

i found out how to set horizen alignment in rich textbox

[示例代码]

richTextBox1.SelectionAlignment = HorizontalAlignment.Center

但不是垂直对齐

我真的很想从每个人那里回答这个问题

i really wanna answer it from everyone

推荐答案

流文档旨在优化查看和可读性.相当不是设置为一个预定义的布局,动态流文档根据调谐时间变量调整和重排它们的内容,例如窗口大小、设备分辨率和可选的用户首选项.

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.

所以,我们无法在 RichTextBox 中设置文档的布局手动,但对于段落,我们可以设置 TextAlignment财产.你也可以尝试设置 Padding 属性RichTextBox 调整其内容.

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.

希望这会有所帮助.

-- 潘凯文

源链接

这篇关于如何在富文本框中设置垂直对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆