可以在Textbox with WrapWithOverFlow生成新行之前添加制表符吗?

时间:2014-01-20 00:22:23

标签: c# asp.net wpf string visual-studio-2010

在我的xaml代码中,我在我的Expander中使用了一个文本框,我设置了它

TestWrapping = "WrapWithOveFlow

因此,只要行太长,文本框就会自动将其分解为新行。 但是,由于这个列表真的被压扁了,我想实现一种缩进以增加它的可读性。

我想知道有没有办法设置文本框将标签(\ t)添加到新行的开头,它从较长的行中断而不是

TITLE: this is a test text and it's
very long
TITLE: this is another test line which
is also very long.

我最终得到了

TITLE: this is a test text and it's
       very long
TITLE: this is another test line which
       is also very long.

我知道有很多方法可以做到这一点,我很乐意听到它们。但是我很想知道这个问题的答案,并且它非常简单易行。

添加了信息 我正在使用

填写此文本框
Text = {Binding testBindingVar}

使用

填充 testBindingVar 的值
testBindingVar += "TITLE: added stuff long and short"

通过GUI和用户交互。我喜欢它的简单性,不需要处理网格和表格。

0 个答案:

没有答案