<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE in the project root for license information. -->
<controls:Page
    x:Class="MUXControlsTestApp.Samples.ActivityFeedSamplePage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="http://schemas.modernwpf.com/2019"
    xmlns:local="clr-namespace:MUXControlsTestApp.Samples">
    <Page.Resources>
        <controls:RecyclePool x:Key="RecyclePool" />
        <controls:RecyclingElementFactory
            x:Key="elementFactory"
            RecyclePool="{StaticResource RecyclePool}">
            <controls:RecyclingElementFactory.Templates>
                <DataTemplate x:Key="Item">
                    <Button
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Stretch">
                        <TextBlock Text="{Binding}" />
                    </Button>
                </DataTemplate>
            </controls:RecyclingElementFactory.Templates>
        </controls:RecyclingElementFactory>
    </Page.Resources>
    <Grid Background="{DynamicResource SystemControlPageBackgroundAltHighBrush}">
        <controls:ItemsRepeaterScrollHost x:Name="tracker">
            <ScrollViewer x:Name="scrollViewer">
                <controls:ItemsRepeater
                    x:Name="repeater"
                    ItemTemplate="{StaticResource elementFactory}">
                    <controls:ItemsRepeater.Layout>
                        <local:ActivityFeedLayout
                            ItemSpacing="12"
                            RowSpacing="12"
                            MinItemSize="200, 200" />
                    </controls:ItemsRepeater.Layout>
                </controls:ItemsRepeater>
            </ScrollViewer>
        </controls:ItemsRepeaterScrollHost>
    </Grid>
</controls:Page>
