Pixiview/Gallery/Illust/MainPage.xaml

44 lines
2.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<i:IllustDataCollectionPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:i="clr-namespace:Gallery.Illust"
xmlns:u="clr-namespace:Gallery.UI"
xmlns:r="clr-namespace:Gallery.Resources"
x:Class="Gallery.Illust.MainPage"
BackgroundColor="{DynamicResource WindowColor}"
Title="{r:Text Follow}">
<ContentPage.ToolbarItems>
<ToolbarItem Order="Primary" Clicked="Refresh_Clicked"
IconImageSource="{DynamicResource FontIconRefresh}"/>
</ContentPage.ToolbarItems>
<Grid>
<ScrollView x:Name="scrollView" Scrolled="ScrollView_Scrolled"
HorizontalOptions="Fill" HorizontalScrollBarVisibility="Never">
<StackLayout>
<ActivityIndicator x:Name="activityLoading" Margin="0, 10, 0, 0"
HeightRequest="40"
IsRunning="{Binding IsLoading}"
IsVisible="{Binding IsLoading}"/>
<u:FlowLayout ItemsSource="{Binding Illusts}"
HorizontalOptions="Fill" Column="{Binding Columns}"
RowSpacing="16" ColumnSpacing="16"
ItemTemplate="{StaticResource cardView}">
<u:FlowLayout.Margin>
<OnPlatform x:TypeArguments="Thickness"
iOS="16, 66, 16, 16"
Android="16, 56, 16, 16"/>
</u:FlowLayout.Margin>
</u:FlowLayout>
</StackLayout>
</ScrollView>
<u:BlurryPanel x:Name="panelBar" VerticalOptions="Start"
HeightRequest="60"/>
<SearchBar x:Name="searchBar" Placeholder="{r:Text Search}"
HeightRequest="40"
VerticalOptions="Start"
CancelButtonColor="{DynamicResource TintColor}"
Text="{Binding Keywords, Mode=TwoWay}"
SearchButtonPressed="SearchBar_SearchButtonPressed"/>
</Grid>
</i:IllustDataCollectionPage>