28,655 questions
Hello there,
Do you mean a TextBox, as opposed to a TextBlock? The default behavior for a TextBox is to show the most recent text as more text is entered.
Window x:Class="textboxscrolltest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<TextBox Width="75" Height="25"/>
</Grid>
</Window>
I don't think TextBlocks can scroll. You can put the TextBlock in a ScrollViewer.
XAML:
<ScrollViewer Name="MyScrollViewer">
<TextBlock TextWrapping="Wrap">
A bunch of text
</TextBlock>
</ScrollViewer>
Code-behind:
MyScrollViewer.ScrollToBottom();
Hope this resolves your Query !!
--If the reply is helpful, please Upvote and Accept it as an answer--