WIn_RustTools/RustTools/App.xaml

82 lines
3.5 KiB
XML

<Application
x:Class="RustTools.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:RustTools.Views"
xmlns:zy="using:RustTools.DataList">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<ResourceDictionary Source="/Styles/FontSizes.xaml" />
<ResourceDictionary Source="/Styles/Thickness.xaml" />
<ResourceDictionary Source="/Styles/TextBlock.xaml" />
<ResourceDictionary Source="/Styles/ItemView.xaml" />
<ResourceDictionary Source="/Styles/TitleSubtitleControlStyle.xaml" />
</ResourceDictionary.MergedDictionaries>
<!-- 用于动态界面的关注用户视图 -->
<DataTemplate x:Key="ConCernItem">
<StackPanel Padding="5" Orientation="Horizontal">
<Border Margin="0,0,0,0" CornerRadius="9">
<Image
Width="56"
Height="56"
VerticalAlignment="Center"
Source="{Binding HeadIcon}"
Stretch="UniformToFill" />
</Border>
<TextBlock
Margin="3,0,0,0"
VerticalAlignment="Center"
Style="{ThemeResource SubtitleTextBlockStyle}"
Text="{Binding UserName}" />
</StackPanel>
</DataTemplate>
<!-- 模组列表的视图 -->
<DataTemplate x:Key="HomePageListItem">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border
Grid.Column="0"
Width="56"
Height="56"
BorderBrush="White"
BorderThickness="0"
CornerRadius="9">
<Border.Background>
<ImageBrush ImageSource="{Binding Icon}" Stretch="UniformToFill" />
</Border.Background>
</Border>
<StackPanel
Grid.Column="1"
Margin="10,10,10,10"
Orientation="Vertical">
<TextBlock Style="{StaticResource SubtitleTextBlockStyle}" Text="{Binding Name}" />
<TextBlock
MaxLines="2"
Style="{StaticResource BodyStrongTextBlockStyle}"
Text="{Binding Description}"
TextTrimming="CharacterEllipsis" />
<TextBlock Style="{StaticResource BodyTextBlockStyle}">
<Run Text="{Binding UpdateTime}" />
<Run Text="{Binding DownloadNumber}" />
<Run Text="次下载" />
</TextBlock>
</StackPanel>
</Grid>
</DataTemplate>
</ResourceDictionary>
</Application.Resources>
</Application>