69 lines
3.2 KiB
XML
69 lines
3.2 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
x:Class="ControlGallery.Pages.RefreshViewPage"
|
|
Title="RefreshView">
|
|
|
|
<RefreshView x:Name="RefreshContainer"
|
|
IsRefreshing="{Binding IsRefreshing}"
|
|
Refreshing="OnRefreshing"
|
|
RefreshColor="{StaticResource Primary}">
|
|
|
|
<ScrollView>
|
|
<VerticalStackLayout Spacing="20" Padding="20">
|
|
|
|
<Label Text="RefreshView" FontSize="24" FontAttributes="Bold" />
|
|
<Label Text="Pull down to refresh the content" TextColor="{StaticResource Gray500}" />
|
|
|
|
<Label x:Name="LastRefreshLabel"
|
|
Text="Last refreshed: Never"
|
|
TextColor="{StaticResource Gray400}"
|
|
HorizontalOptions="Center" />
|
|
|
|
<BoxView HeightRequest="1" Color="{StaticResource Gray200}" />
|
|
|
|
<!-- Simulated content that gets refreshed -->
|
|
<Frame Padding="15" CornerRadius="8" BackgroundColor="{StaticResource Secondary}">
|
|
<VerticalStackLayout Spacing="10">
|
|
<Label Text="News Feed" FontAttributes="Bold" FontSize="18" />
|
|
|
|
<Frame Padding="10" CornerRadius="5" BackgroundColor="White">
|
|
<VerticalStackLayout>
|
|
<Label x:Name="NewsItem1" Text="Loading..." FontAttributes="Bold" />
|
|
<Label Text="2 minutes ago" TextColor="{StaticResource Gray400}" FontSize="12" />
|
|
</VerticalStackLayout>
|
|
</Frame>
|
|
|
|
<Frame Padding="10" CornerRadius="5" BackgroundColor="White">
|
|
<VerticalStackLayout>
|
|
<Label x:Name="NewsItem2" Text="Loading..." FontAttributes="Bold" />
|
|
<Label Text="15 minutes ago" TextColor="{StaticResource Gray400}" FontSize="12" />
|
|
</VerticalStackLayout>
|
|
</Frame>
|
|
|
|
<Frame Padding="10" CornerRadius="5" BackgroundColor="White">
|
|
<VerticalStackLayout>
|
|
<Label x:Name="NewsItem3" Text="Loading..." FontAttributes="Bold" />
|
|
<Label Text="1 hour ago" TextColor="{StaticResource Gray400}" FontSize="12" />
|
|
</VerticalStackLayout>
|
|
</Frame>
|
|
</VerticalStackLayout>
|
|
</Frame>
|
|
|
|
<Button Text="Manual Refresh"
|
|
Clicked="OnManualRefreshClicked"
|
|
BackgroundColor="{StaticResource Primary}"
|
|
TextColor="White" />
|
|
|
|
<Label Text="Tip: You can also pull down on this page to trigger a refresh."
|
|
FontSize="12"
|
|
TextColor="{StaticResource Gray400}"
|
|
HorizontalTextAlignment="Center" />
|
|
|
|
</VerticalStackLayout>
|
|
</ScrollView>
|
|
|
|
</RefreshView>
|
|
|
|
</ContentPage>
|