0
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
     <ScrollViewer  Height="400" HorizontalAlignment="Left" Margin="18,0,0,0" Name="scrollViewer1" VerticalAlignment="Top" Width="400" Grid.Row="1" VerticalScrollBarVisibility="Auto">
         <StackPanel Height="Auto" x:Name="TitlePanelOne" Background="AliceBlue" Grid.Row="0" Margin="12,17,0,28">
              <toolkit:PhoneTextBox Background="Aquamarine" Hint="tap to enter the title" BorderThickness="2"></toolkit:PhoneTextBox>
              <toolkit:PhoneTextBox Foreground="Black" AcceptsReturn="True" TextWrapping="Wrap" Hint="Tap To entr the Note" BorderThickness="2" VerticalAlignment="Top" Height="Auto" HorizontalAlignment="Left" Name="textBox1" Width="460"></toolkit:PhoneTextBox>
         </StackPanel>
     </ScrollViewer>
</Grid>

代码工作正常,但问题是如果我在文本框中输入单词,它会获得 scrool 视图。

如果我在文本框中键入更多行,则键入行不会向用户显示如何避免这种情况,有什么猜测吗?

4

1 回答 1

0

只需复制此块而不是您的块。

<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
      <StackPanel Height="420" x:Name="TitlePanelOne" Background="AliceBlue" Grid.Row="0" Margin="12,17,0,28" Width="400">
         <toolkit:PhoneTextBox Background="Aquamarine" Hint="tap to enter the title" BorderThickness="2"></toolkit:PhoneTextBox>
         <ScrollViewer  Height="320" HorizontalAlignment="Left" Margin="0,0,0,0" Name="scrollViewer1" VerticalAlignment="Top" Width="400" Grid.Row="1" VerticalScrollBarVisibility="Auto">
              <toolkit:PhoneTextBox Foreground="Black" AcceptsReturn="True" Margin="10,0,0,0" TextWrapping="Wrap" Hint="Tap To entr the Note" BorderThickness="2" VerticalAlignment="Top" Height="250" HorizontalAlignment="Left" Name="textBox1" Width="380"></toolkit:PhoneTextBox>
         </ScrollViewer>
     </StackPanel>
</Grid>

请放置文本框的高度,以便在输入行上轻松显示用户的文本。

它根据您的查询工作。谢谢你。

我希望你得到解决方案。

于 2013-10-17T13:06:07.067 回答