Skip to content

Commit 8cd831c

Browse files
committed
Renamed ScrollViewer and changed scrollOffset to ScrollableHeight
1 parent ad390c5 commit 8cd831c

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/Codebreaker.WinUI/Views/Pages/GamePage.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
ViewModel="{x:Bind ViewModel, Mode=OneWay}" />
9595
</StackPanel>
9696
<!--Move section-->
97-
<ScrollViewer Grid.Row="2" Padding="0,0,0,15" x:Name="pegScrollView">
97+
<ScrollViewer Grid.Row="2" Padding="0,0,0,15" x:Name="pegScrollViewer">
9898
<ListBox
9999
x:Name="listGameMoves"
100100
Background="Transparent"

src/Codebreaker.WinUI/Views/Pages/GamePage.xaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public void Receive(GameMoveMessage message)
4343
});
4444

4545
// Scroll to bottom
46-
pegScrollView.UpdateLayout();
47-
pegScrollView.ScrollToVerticalOffset(1000000000);
46+
pegScrollViewer.UpdateLayout();
47+
pegScrollViewer.ScrollToVerticalOffset(pegScrollViewer.ScrollableHeight);
4848
}
4949
}

0 commit comments

Comments
 (0)