<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE in the project root for license information. -->
<ui:Page
    x:Class="MUXControlsTestApp.Samples.CircleLayoutSamplePage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ui="http://schemas.modernwpf.com/2019"
    xmlns:local="clr-namespace:MUXControlsTestApp.Samples"
    xmlns:controls="clr-namespace:ModernWpf.Controls;assembly=ModernWpf.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Page.Resources>
        <DataTemplate x:Key="PersonTemplate">
            <Border MouseLeftButtonUp="OnExistingItemTapped">
                <Grid>
                    <Ellipse
                        HorizontalAlignment="Stretch"
                        VerticalAlignment="Stretch"
                        Fill="LightGray" />
                    <TextBlock
                        Text="{Binding Id}"
                        FontSize="52"
                        FontWeight="Bold"
                        Foreground="#555"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center" />
                </Grid>
            </Border>
        </DataTemplate>
        <local:CircleLayout
            x:Key="CircleLayout"
            ItemSize="100" />
        <!--<local:RadialElementAnimator x:Name="RadialAnimator" />-->
    </Page.Resources>

    <Grid Margin="12">
        <Grid.Background>
            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                <GradientStop Color="{DynamicResource SystemAltHighColor}" />
                <GradientStop Color="{DynamicResource SystemChromeMediumColor}" Offset="1" />
            </LinearGradientBrush>
        </Grid.Background>

        <controls:ItemsRepeaterScrollHost x:Name="tracker">
            <ScrollViewer>
                <StackPanel>
                    <Button x:Name="bringIntoView">Bring Into View</Button>
                    <Button x:Name="expandButton">Expand Button</Button>
                    <TextBox
                        x:Name="maximumHorizontalCacheLength"
                        ui:ControlHelper.PlaceholderText="HorizontalCacheLength" />
                    <TextBox
                        x:Name="maximumVerticalCacheLength"
                        ui:ControlHelper.PlaceholderText="VerticalCacheLength" />
                    <Grid
                        Margin="25"
                        Width="600"
                        Height="600">
                        <ContentPresenter
                            x:Name="newItem"
                            ContentTemplate="{StaticResource PersonTemplate}"
                            Width="100"
                            Height="100" />
                        <controls:ItemsRepeater
                            x:Name="repeater"
                            Layout="{StaticResource CircleLayout}" />
                        <StackPanel
                            HorizontalAlignment="Right"
                            VerticalAlignment="Top"
                            Margin="10">
                            <Button
                                x:Name="shuffle"
                                HorizontalAlignment="Stretch">
                                Shuffle
                            </Button>
                            <!--<CheckBox
                                x:Name="customAnimations"
                                HorizontalAlignment="Stretch"
                                IsChecked="True">
                                Custom Animations
                            </CheckBox>-->
                        </StackPanel>
                    </Grid>
                </StackPanel>
            </ScrollViewer>
        </controls:ItemsRepeaterScrollHost>
    </Grid>
</ui:Page>
