WIn_RustTools/RustTools/Views/HomePage.xaml

75 lines
3.1 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"
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-19 07:36:44 +00:00
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">
2024-07-19 14:29:49 +00:00
<Image Source="{x:Bind Mode=OneTime}" Stretch="Fill" />
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}"
SelectedPageIndex="{x:Bind Path=Gallery.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
Icon="Refresh"
Label="刷新"
RelativePanel.AlignRightWithPanel="True" />
</RelativePanel>
<ListView
2024-07-19 14:29:49 +00:00
x:Name="list"
2024-07-19 07:36:44 +00:00
IsItemClickEnabled="True"
ItemsSource="{x:Bind conns}"
SelectionMode="None">
<ListView.ItemTemplate>
<DataTemplate>
2024-07-19 14:29:49 +00:00
<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>
2024-07-19 07:36:44 +00:00
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
2024-07-14 11:24:10 +00:00
2024-07-19 07:36:44 +00:00
<RelativePanel>
<TextBlock Style="{StaticResource TitleTextBlockStyle}" Text="最新发布" />
<AppBarButton
Icon="Refresh"
Label="刷新"
RelativePanel.AlignRightWithPanel="True" />
</RelativePanel>
<ListView
Grid.Row="2"
IsItemClickEnabled="True"
SelectionMode="None" />
</StackPanel>
</ScrollView>
2024-07-14 11:24:10 +00:00
</Page>