TextBox
TextWrapping
TextWrapping.NoWrap
,它将把它分割成9600个字符行,将它们包裹起来,然后垂直增长。有什么好的理由吗?有什么办法可以预防吗?
文本框
演示这一点的XAML不需要比以下内容更复杂:
<Window x:Class="TestApp.TestWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Title="TestWindow" Height="300" Width="300">
<TextBox TextWrapping="NoWrap" HorizontalAlignment="Left" VerticalAlignment="Top" />
</Window>