WIn_RustTools/RustTools/Views/HomePage.xaml

75 lines
3.1 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:local="using:RustTools.Views"
xmlns:local1="using:Windows.ApplicationModel.Contacts"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<ScrollView HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
<StackPanel Orientation="Vertical">
<FlipView
x:Name="Gallery"
Height="270"
ItemsSource="{x:Bind Pictures}">
<FlipView.ItemTemplate>
<DataTemplate x:DataType="x:String">
<Image Source="{x:Bind Mode=OneTime}" Stretch="Fill" />
</DataTemplate>
</FlipView.ItemTemplate>
</FlipView>
<PipsPager
x:Name="FlipViewPipsPager"
Margin="0,12,0,0"
HorizontalAlignment="Center"
NumberOfPages="{x:Bind Pictures.Count}"
SelectedPageIndex="{x:Bind Path=Gallery.SelectedIndex, Mode=TwoWay}" />
<RelativePanel>
<TextBlock Style="{StaticResource TitleTextBlockStyle}" Text="随机推荐" />
<AppBarButton
Icon="Refresh"
Label="刷新"
RelativePanel.AlignRightWithPanel="True" />
</RelativePanel>
<ListView
x:Name="list"
IsItemClickEnabled="True"
ItemsSource="{x:Bind conns}"
SelectionMode="None">
<ListView.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Image
Width="56"
Height="56"
Source="{Binding ImageUrl}" />
<StackPanel Orientation="Vertical">
<TextBlock Style="{StaticResource SubtitleTextBlockStyle}" Text="{Binding Title}" />
<TextBlock Style="{StaticResource BodyStrongTextBlockStyle}" Text="{Binding Message}" />
<TextBlock Style="{StaticResource BodyTextBlockStyle}" Text="{Binding Info}" />
</StackPanel>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<RelativePanel>
<TextBlock Style="{StaticResource TitleTextBlockStyle}" Text="最新发布" />
<AppBarButton
Icon="Refresh"
Label="刷新"
RelativePanel.AlignRightWithPanel="True" />
</RelativePanel>
<ListView
Grid.Row="2"
IsItemClickEnabled="True"
SelectionMode="None" />
</StackPanel>
</ScrollView>
</Page>