繁体   English   中英

文本框滚动不适用于Windows Phone

[英]textbox scrolling not fit in windows phone

<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视图。

如果我在文本框中键入更多行,则键入行未向用户显示如何避免这种情况,您猜到了吗?

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

<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>

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

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

希望您能找到解决方案。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM