WIn_RustTools/RustTools/App.xaml

79 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">
<StackPanel Orientation="Horizontal">
<Border
Width="56"
Height="56"
BorderBrush="White"
BorderThickness="0"
CornerRadius="9">
<Border.Background>
<ImageBrush ImageSource="{Binding Icon}" Stretch="UniformToFill" />
</Border.Background>
</Border>
<StackPanel Margin="10,10,10,10" Orientation="Vertical">
<TextBlock Style="{StaticResource SubtitleTextBlockStyle}" Text="{Binding Name}" />
<TextBlock
Width="500"
MaxLines="2"
Style="{StaticResource BodyStrongTextBlockStyle}"
Text="{Binding Description}"
TextTrimming="CharacterEllipsis"
TextWrapping="Wrap" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource BodyTextBlockStyle}" Text="{Binding UpdateTime}" />
<TextBlock
Margin="10,0,0,0"
Style="{StaticResource BodyTextBlockStyle}"
Text="{Binding CoinNumber}" />
<TextBlock Style="{StaticResource BodyTextBlockStyle}" Text="次下载" />
</StackPanel>
</StackPanel>
</StackPanel>
</DataTemplate>
</ResourceDictionary>
</Application.Resources>
</Application>