79 lines
3.0 KiB
XML
79 lines
3.0 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<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"
|
|
xmlns:local="using:RustTools.Views"
|
|
xmlns:local1="using:Windows.ApplicationModel.Contacts"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
SizeChanged="Page_SizeChanged"
|
|
mc:Ignorable="d">
|
|
|
|
|
|
<ScrollView HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
|
|
<StackPanel Orientation="Vertical">
|
|
<FlipView
|
|
x:Name="Banner"
|
|
Height="360"
|
|
ItemsSource="{x:Bind Pictures}">
|
|
<FlipView.ItemTemplate>
|
|
<DataTemplate x:DataType="data:HomeBanner">
|
|
<Image
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Source="{Binding picture}"
|
|
Stretch="UniformToFill"
|
|
Tapped="Image_Tapped" />
|
|
</DataTemplate>
|
|
</FlipView.ItemTemplate>
|
|
</FlipView>
|
|
<PipsPager
|
|
x:Name="FlipViewPipsPager"
|
|
Margin="0,12,0,0"
|
|
HorizontalAlignment="Center"
|
|
NumberOfPages="{x:Bind Pictures.Count}"
|
|
SelectedPageIndex="{x:Bind Path=Banner.SelectedIndex, Mode=TwoWay}" />
|
|
|
|
<RelativePanel>
|
|
<TextBlock Style="{StaticResource TitleTextBlockStyle}" Text="随机推荐" />
|
|
<AppBarButton
|
|
Click="RefreshRandom"
|
|
Icon="Refresh"
|
|
Label="刷新"
|
|
RelativePanel.AlignRightWithPanel="True" />
|
|
</RelativePanel>
|
|
|
|
<ListView
|
|
x:Name="ListA"
|
|
HorizontalAlignment="Stretch"
|
|
IsItemClickEnabled="True"
|
|
ItemTemplate="{StaticResource HomePageListItem}"
|
|
ItemsSource="{x:Bind ViewModel.randomList}"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
SelectionMode="None" />
|
|
|
|
<RelativePanel>
|
|
<TextBlock Style="{StaticResource TitleTextBlockStyle}" Text="最新发布" />
|
|
<AppBarButton
|
|
Click="RefreshLatest"
|
|
Icon="Refresh"
|
|
Label="刷新"
|
|
RelativePanel.AlignRightWithPanel="True" />
|
|
</RelativePanel>
|
|
<ListView
|
|
Name="ListB"
|
|
Grid.Row="2"
|
|
Margin="0,0,0,50"
|
|
IsItemClickEnabled="True"
|
|
ItemTemplate="{StaticResource HomePageListItem}"
|
|
ItemsSource="{x:Bind ViewModel.latestTimeList}"
|
|
SelectionMode="None" />
|
|
|
|
</StackPanel>
|
|
|
|
</ScrollView>
|
|
|
|
</Page>
|