Skip to content

Commit 059479f

Browse files
committed
Added ScrollViewer to peg ItemsControl
1 parent d6de8ac commit 059479f

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

  • src/CodeBreaker.Avalonia/CodeBreaker.Avalonia/Views/Pages

src/CodeBreaker.Avalonia/CodeBreaker.Avalonia/Views/Pages/GamePage.axaml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,21 @@
3434
Grid.Row="0"
3535
IsVisible="{Binding GameStatus, Mode=OneWay, Converter={StaticResource GameStatusToBooleanConverter}, ConverterParameter=Cancelable}"
3636
Margin="55,0,0,15" />
37-
<ItemsControl
38-
IsVisible="{Binding GameStatus, Mode=OneWay, ConverterParameter=Running}"
37+
<ScrollViewer
38+
x:Name="pegScrollViewer"
39+
Padding="0,0,0,15"
3940
Grid.Row="1"
40-
ItemsSource="{Binding GameMoves, Mode=OneWay}"
41-
ItemTemplate="{StaticResource PegsTemplate}">
42-
<ItemsControl.ItemsPanel>
43-
<ItemsPanelTemplate>
44-
<StackPanel Orientation="Vertical" Spacing="15" />
45-
</ItemsPanelTemplate>
46-
</ItemsControl.ItemsPanel>
47-
</ItemsControl>
41+
IsVisible="{Binding GameStatus, Mode=OneWay, ConverterParameter=Running}">
42+
<ItemsControl
43+
ItemsSource="{Binding GameMoves, Mode=OneWay}"
44+
ItemTemplate="{StaticResource PegsTemplate}">
45+
<ItemsControl.ItemsPanel>
46+
<ItemsPanelTemplate>
47+
<StackPanel Orientation="Vertical" Spacing="15" />
48+
</ItemsPanelTemplate>
49+
</ItemsControl.ItemsPanel>
50+
</ItemsControl>
51+
</ScrollViewer>
4852
<Button Grid.Row="2" Content="To TestPage" Click="ToTestPageButtonClicked" />
4953
</Grid>
5054
</UserControl>

0 commit comments

Comments
 (0)