Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/334.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 接收顶部行的多行文本框_C#_Wpf - Fatal编程技术网

C# 接收顶部行的多行文本框

C# 接收顶部行的多行文本框,c#,wpf,C#,Wpf,我有一个多行文本框,它接收来自不同类的值,我希望每一行都添加在顶部而不是底部,我如何才能做到这一点?使用: 你能显示你的代码吗?你可以这样做:yourTextBox.Text=Text-on-top\b\r+yourTextBox.Text可以通过编写代码和使用谷歌搜索来完成,当然不需要在这里询问甚至不尝试。 textBox.Text = textBox.Text.Insert(0, string.Format("{0}\r\n", "Your text content here"));

我有一个多行文本框,它接收来自不同类的值,我希望每一行都添加在顶部而不是底部,我如何才能做到这一点?

使用:


你能显示你的代码吗?你可以这样做:yourTextBox.Text=Text-on-top\b\r+yourTextBox.Text可以通过编写代码和使用谷歌搜索来完成,当然不需要在这里询问甚至不尝试。
textBox.Text = textBox.Text.Insert(0, string.Format("{0}\r\n", "Your text content here"));