Is there a way to set TextBox ScrollBar to be at the bottom?
Posted: 17 Apr 2018, 21:15
Have dug around a bit an cannot find a solution to the problem. I have a TextBox that looks like this:
Every end of turn, this is populated with a play-by-play of the most recent turn. I would like the TextBox to start each turn scrolled all the way to the bottom rather than it's default which is starting at the top. I know that TextBox in xaml has the ScrollToEnd() method, but I can't get that to work in Noesis. When I try I get this error:
Assets/drawgame/XamlUI/Resources/GameHud.xaml.cs(45,23): error CS1061: Type `Noesis.TextBox' does not contain a definition for `ScrollToEnd' and no extension method `ScrollToEnd' of type `Noesis.TextBox' could be found. Are you missing an assembly reference?
Any work around for this?
Code: Select all
<TextBox
x:Name="BattleLogBox"
Grid.Column="2"
VerticalScrollBarVisibility="Auto"
ScrollViewer.CanContentScroll="True"
MaxLines="6" MinLines="4"
TextWrapping="Wrap"
Text="{Binding BattleText, Mode=OneWay}"/>Assets/drawgame/XamlUI/Resources/GameHud.xaml.cs(45,23): error CS1061: Type `Noesis.TextBox' does not contain a definition for `ScrollToEnd' and no extension method `ScrollToEnd' of type `Noesis.TextBox' could be found. Are you missing an assembly reference?
Any work around for this?