2026-03-28 21:12:04 -05:00
|
|
|
<UserControl xmlns="https://github.com/avaloniaui"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
2026-06-06 05:49:24 -05:00
|
|
|
xmlns:vm="using:LANCommander.Launcher.ViewModels"
|
|
|
|
|
xmlns:vmComponents="using:LANCommander.Launcher.ViewModels.Components"
|
|
|
|
|
xmlns:local="using:LANCommander.Launcher.Views"
|
|
|
|
|
xmlns:components="using:LANCommander.Launcher.Views.Components"
|
|
|
|
|
xmlns:controls="using:LANCommander.Launcher.Controls"
|
|
|
|
|
x:Class="LANCommander.Launcher.Views.GamesGridView"
|
2026-03-28 21:12:04 -05:00
|
|
|
x:DataType="vm:GamesCollectionViewModel">
|
|
|
|
|
|
|
|
|
|
<ScrollViewer x:Name="FlatGridScrollViewer"
|
2026-05-28 00:14:22 -05:00
|
|
|
Classes="TitlebarOffset"
|
2026-03-28 21:12:04 -05:00
|
|
|
HorizontalScrollBarVisibility="Disabled"
|
|
|
|
|
VerticalScrollBarVisibility="Auto"
|
2026-04-22 19:37:44 -05:00
|
|
|
controls:ScrollPersistence.ViewModel="{Binding}"
|
2026-03-28 21:12:04 -05:00
|
|
|
SizeChanged="FlatGridScrollViewer_SizeChanged">
|
2026-05-26 00:14:13 -05:00
|
|
|
<ItemsRepeater x:Name="FlatGridItemsRepeater" ItemsSource="{Binding Games}" Margin="24,56,24,24" ClipToBounds="False"
|
|
|
|
|
controls:DirectionalNavigation.IsEnabled="True"
|
|
|
|
|
controls:AutoFocus.IsEnabled="True">
|
2026-03-28 21:12:04 -05:00
|
|
|
<ItemsRepeater.Layout>
|
|
|
|
|
<UniformGridLayout MinItemWidth="140" MinItemHeight="210"
|
|
|
|
|
MinColumnSpacing="12" MinRowSpacing="12"
|
|
|
|
|
ItemsStretch="None"
|
|
|
|
|
ItemsJustification="Start" />
|
|
|
|
|
</ItemsRepeater.Layout>
|
|
|
|
|
<ItemsRepeater.ItemTemplate>
|
|
|
|
|
<DataTemplate DataType="vmComponents:GameItemViewModel">
|
2026-03-29 00:53:06 -05:00
|
|
|
<components:CoverButton
|
|
|
|
|
Width="{Binding $parent[local:GamesGridView].CoverWidth}"
|
|
|
|
|
Height="{Binding $parent[local:GamesGridView].CoverHeight}"
|
2026-06-25 19:46:19 -05:00
|
|
|
controls:GameContextMenu.IsEnabled="True"
|
2026-03-29 00:53:06 -05:00
|
|
|
Command="{Binding $parent[ItemsRepeater].((vm:GamesCollectionViewModel)DataContext).ViewGameDetailsCommand}"
|
|
|
|
|
CommandParameter="{Binding}" />
|
2026-03-28 21:12:04 -05:00
|
|
|
</DataTemplate>
|
|
|
|
|
</ItemsRepeater.ItemTemplate>
|
|
|
|
|
</ItemsRepeater>
|
|
|
|
|
</ScrollViewer>
|
|
|
|
|
|
|
|
|
|
</UserControl>
|