WIn_RustTools/RustTools/Views/HomePage.xaml

79 lines
3.0 KiB
Plaintext
Raw Normal View History

2024-07-19 07:36:44 +00:00
<?xml version="1.0" encoding="utf-8" ?>
2024-07-14 11:24:10 +00:00
<Page
x:Class="RustTools.Views.HomePage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:data="using:RustTools.DataList"
2024-07-19 07:36:44 +00:00
xmlns:local="using:RustTools.Views"
xmlns:local1="using:Windows.ApplicationModel.Contacts"
2024-07-14 11:24:10 +00:00
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
2024-07-23 12:23:55 +00:00
SizeChanged="Page_SizeChanged"
2024-07-19 07:36:44 +00:00
mc:Ignorable="d">
2024-07-23 12:23:55 +00:00
<ScrollView HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
2024-07-19 07:36:44 +00:00
<StackPanel Orientation="Vertical">
<FlipView
2024-07-23 12:23:55 +00:00
x:Name="Banner"
Height="360"
2024-07-19 07:36:44 +00:00
ItemsSource="{x:Bind Pictures}">
<FlipView.ItemTemplate>
<DataTemplate x:DataType="data:HomeBanner">
2024-07-23 12:23:55 +00:00
<Image
HorizontalAlignment="Center"
VerticalAlignment="Center"
Source="{Binding picture}"
2024-07-28 13:33:21 +00:00
Stretch="UniformToFill"
Tapped="Image_Tapped" />
2024-07-19 07:36:44 +00:00
</DataTemplate>
</FlipView.ItemTemplate>
</FlipView>
<PipsPager
x:Name="FlipViewPipsPager"
Margin="0,12,0,0"
HorizontalAlignment="Center"
NumberOfPages="{x:Bind Pictures.Count}"
2024-07-23 12:23:55 +00:00
SelectedPageIndex="{x:Bind Path=Banner.SelectedIndex, Mode=TwoWay}" />
2024-07-14 11:24:10 +00:00
2024-07-19 07:36:44 +00:00
<RelativePanel>
<TextBlock Style="{StaticResource TitleTextBlockStyle}" Text="随机推荐" />
<AppBarButton
Click="RefreshRandom"
2024-07-19 07:36:44 +00:00
Icon="Refresh"
Label="刷新"
RelativePanel.AlignRightWithPanel="True" />
</RelativePanel>
2024-07-23 12:23:55 +00:00
2024-07-19 07:36:44 +00:00
<ListView
x:Name="ListA"
2024-07-23 12:23:55 +00:00
HorizontalAlignment="Stretch"
2024-07-19 07:36:44 +00:00
IsItemClickEnabled="True"
2024-07-23 12:23:55 +00:00
ItemTemplate="{StaticResource HomePageListItem}"
ItemsSource="{x:Bind ViewModel.randomList}"
2024-07-23 12:23:55 +00:00
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
SelectionMode="None" />
2024-07-14 11:24:10 +00:00
2024-07-19 07:36:44 +00:00
<RelativePanel>
<TextBlock Style="{StaticResource TitleTextBlockStyle}" Text="最新发布" />
<AppBarButton
Click="RefreshLatest"
2024-07-19 07:36:44 +00:00
Icon="Refresh"
Label="刷新"
RelativePanel.AlignRightWithPanel="True" />
</RelativePanel>
<ListView
Name="ListB"
2024-07-19 07:36:44 +00:00
Grid.Row="2"
2024-07-23 12:23:55 +00:00
Margin="0,0,0,50"
2024-07-19 07:36:44 +00:00
IsItemClickEnabled="True"
2024-07-23 12:23:55 +00:00
ItemTemplate="{StaticResource HomePageListItem}"
ItemsSource="{x:Bind ViewModel.latestTimeList}"
2024-07-19 07:36:44 +00:00
SelectionMode="None" />
2024-07-23 12:23:55 +00:00
2024-07-19 07:36:44 +00:00
</StackPanel>
2024-07-23 12:23:55 +00:00
2024-07-19 07:36:44 +00:00
</ScrollView>
2024-07-23 12:23:55 +00:00
2024-07-14 11:24:10 +00:00
</Page>