estara/Estara/Views/ContentGridPage.xaml

44 lines
2.0 KiB
XML

<Page
x:Class="Estara.Views.ContentGridPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:animations="using:CommunityToolkit.WinUI.UI.Animations"
xmlns:controls="using:CommunityToolkit.WinUI.UI.Controls"
xmlns:models="using:Estara.Core.Models"
mc:Ignorable="d">
<Grid x:Name="ContentArea">
<controls:AdaptiveGridView
animations:Connected.ListItemElementName="itemThumbnail"
animations:Connected.ListItemKey="animationKeyContentGrid"
DesiredWidth="180"
ItemHeight="160"
IsItemClickEnabled="True"
ItemClickCommand="{x:Bind ViewModel.ItemClickCommand}"
ItemsSource="{x:Bind ViewModel.Source,Mode=OneWay}"
SelectionMode="None"
StretchContentForSingleRow="False">
<controls:AdaptiveGridView.ItemTemplate>
<DataTemplate x:DataType="models:SampleOrder">
<Grid
x:Name="itemThumbnail"
Padding="{StaticResource XSmallLeftTopRightBottomMargin}">
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<FontIcon
Glyph="{x:Bind Symbol}"
AutomationProperties.Name="{x:Bind SymbolName}" />
<TextBlock
Margin="{StaticResource XXSmallTopMargin}"
HorizontalAlignment="Center"
Style="{ThemeResource BodyTextStyle}"
Text="{x:Bind Company}" />
</StackPanel>
</Grid>
</DataTemplate>
</controls:AdaptiveGridView.ItemTemplate>
</controls:AdaptiveGridView>
</Grid>
</Page>