<?xml version="1.0" encoding="UTF-8"?>
<i:IllustUserDataCollectionPage xmlns="http://xamarin.com/schemas/2014/forms"
                                xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
                                xmlns:i="clr-namespace:Pixiview.Illust"
                                xmlns:u="clr-namespace:Pixiview.UI"
                                x:Class="Pixiview.Illust.UserIllustPage"
                                BackgroundColor="{DynamicResource WindowColor}">
    <Shell.TitleView>
        <StackLayout Orientation="Horizontal" Padding="0, 2, 0, 4">
            <u:CircleImage Aspect="AspectFill" Source="{Binding UserIcon}"/>
            <Label Text="{Binding IllustItem.UserName}" Margin="10, 0, 0, 0"
                   VerticalOptions="Center" LineBreakMode="TailTruncation"
                   TextColor="{DynamicResource TextColor}"/>
        </StackLayout>
    </Shell.TitleView>
    <ContentPage.ToolbarItems>
        <ToolbarItem Order="Primary" Clicked="Refresh_Clicked"
                     IconImageSource="{DynamicResource FontIconRefresh}"/>
    </ContentPage.ToolbarItems>
    <Grid>
        <ScrollView HorizontalOptions="Fill">
            <u:FlowLayout ItemsSource="{Binding Illusts}"
                          HorizontalOptions="Fill" Column="{Binding Columns}"
                          Margin="16" RowSpacing="16" ColumnSpacing="16"
                          ItemTemplate="{StaticResource cardView}"/>
        </ScrollView>
        <Frame HasShadow="False" Margin="0" Padding="20" CornerRadius="8"
               IsVisible="{Binding IsLoading}"
               HorizontalOptions="Center" VerticalOptions="Center"
               BackgroundColor="{DynamicResource MaskColor}">
            <ActivityIndicator IsRunning="True" IsVisible="True"
                               Color="{DynamicResource WindowColor}"/>
        </Frame>
    </Grid>
</i:IllustUserDataCollectionPage>
