2013-03-22 188 views
2

我有問題,只要用戶可以輸入文本,只要他想要,但是如果TextBox的可視部分已滿,它不會自動滾動到新行。Windows Phone 8 - 可滾動文本框

<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,12"> 
     <ListBox> 
      <ListBoxItem HorizontalContentAlignment="Stretch"> 
       <toolkit:PhoneTextBox x:Name="PinNameTextBox" Hint="{Binding Path=LocalizedResources.Untitled, Source={StaticResource LocalizedStrings}}" Text="{Binding Name, Mode=TwoWay}" /> 
      </ListBoxItem> 
      <ListBoxItem HorizontalContentAlignment="Stretch"> 
       <TextBox x:Name="PinContentTextBox" Text="{Binding Text, Mode=TwoWay}" AcceptsReturn="True" TextWrapping="Wrap" InputScope="Text" /> 
      </ListBoxItem> 
     </ListBox> 
    </Grid> 

我也嘗試了ScrollViewer,但它不起作用。

enter image description here

回答

1

我想這已經是相同的情況下,與WP7;從我聽說的這是一個平臺限制導致UIElements如如果文本框超過2048px,將被剪裁。

雖然您可以嘗試使用與 here類似的方法創建自己的TextBox控件。希望有所幫助。

+0

UIElements的大小的確限制在2048x2048px(在ScaleFactor 100上) – 2013-03-24 00:32:15