问题
I am new to C# and Universal App. Unfortunately I have not found a way to add a scrollbar to a textblock / textbox. Does anybody have an idea how to do this?
Regards
回答1:
Here is quick solution. Put TextBox
inside ScrollViewer
.
<ScrollViewer Height="Auto">
<TextBox x:Name="textBox1" Text="example" AcceptsReturn="True" TextWrapping="Wrap"/>
</ScrollViewer>
来源:https://stackoverflow.com/questions/38228489/c-sharp-universal-app-add-scrollbar-to-textblock-textblock