Home > DeveloperSection > Forums > Scrollable TextBox
Royce Roy
Royce Roy

Total Post:134

Points:938
Posted on    April-14-2015 9:19 AM

 XAML XAML  Windows Phone 
Ratings:


 1 Reply(s)
 625  View(s)
Rate this:
I have the problem that the user can enter text as long as he wants, but if the visual part of TextBox is full filled, it does not autoscroll to the new line
 <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>
I have also tried the ScrollViewer but it does not work.



Mayank Tripathi
Mayank Tripathi

Total Post:397

Points:3117
Supported
Posted on    April-14-2015 9:27 AM

I think this was already the same case with WP7; from what I've heard it is a platform restriction that causes UIElements like e.g. TextBoxes to be clipped if they exceed 2048px.

You could try to create an own TextBox control with a similar approach to what was done here, though. Hope that helps.


Don't want to miss updates? Please click the below button!

Follow MindStick