WIn_RustTools/RustTools/WindowUI/ModuleInfoWin.xaml
2024-08-08 12:29:27 +08:00

133 lines
5.0 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<windowex:WindowEx
x:Class="RustTools.WindowUI.ModuleInfoWin"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:windowex="using:WinUIEx"
Title="信息"
MinWidth="650"
MinHeight="500"
Closed="WindowEx_Closed"
SizeChanged="WindowEx_SizeChanged"
mc:Ignorable="d">
<Grid x:Name="grid"
Padding="16,36,16,10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions/>
<StackPanel Grid.Row="0"
Orientation="Horizontal">
<Border
Width="106"
Height="106"
CornerRadius="9">
<Border.Background>
<ImageBrush ImageSource="{Binding Mod.IconUrl}"
Stretch="UniformToFill"/>
</Border.Background>
</Border>
<StackPanel Margin="16,3,9,3"
Orientation="Vertical">
<TextBlock Style="{StaticResource TitleLargeTextBlockStyle}"
Text="{Binding Mod.Name}"/>
<TextBlock
x:Name="title_b"
Margin="0,3,0,0"
Style="{StaticResource BodyTextBlockStyle}"
Text="加载中"/>
<TextBlock
x:Name="title_c"
Margin="0,9,0,0"
Style="{StaticResource BodyTextBlockStyle}"
Text="加载中"/>
</StackPanel>
</StackPanel>
<ScrollView Grid.Row="1">
<StackPanel Margin="0,26,0,0"
Orientation="Vertical">
<TextBlock Style="{StaticResource SubtitleTextBlockStyle}"
Text="介绍"/>
<TextBlock
x:Name="DescriptionText"
Padding="6,6,6,6"
Style="{StaticResource BodyTextBlockStyle}"
Text="{Binding Mod.Description}"
TextWrapping="Wrap"/>
<TextBlock
x:Name="fliptext"
Style="{StaticResource SubtitleTextBlockStyle}"
Text="截图"
Visibility="Collapsed"/>
<FlipView
x:Name="flipview"
MaxWidth="600"
MaxHeight="360"
Margin="6,6,6,6"
HorizontalAlignment="Left"
ItemsSource="{x:Bind ScreenshotsList}"
Visibility="Collapsed">
<FlipView.ItemTemplate>
<DataTemplate x:DataType="x:String">
<Image Source="{x:Bind Mode=OneTime}"
Stretch="Uniform"/>
</DataTemplate>
</FlipView.ItemTemplate>
</FlipView>
</StackPanel>
</ScrollView>
<CommandBar
Grid.Row="3"
VerticalAlignment="Bottom"
Background="Transparent"
DefaultLabelPosition="Right"
IsOpen="False">
<CommandBar.PrimaryCommands>
<AppBarButton
Name="ReportButton"
Click="AppBarButton_Click"
Icon="ReportHacked"
Label="举报"/>
<AppBarSeparator/>
<AppBarButton
Name="LikeButton"
Click="AppBarButton_Click"
Icon="Like"
Label="支持"/>
<AppBarSeparator/>
<AppBarButton
Name="DownLoadButton"
Click="AppBarButton_Click"
Icon="Download"
Label="下载"/>
</CommandBar.PrimaryCommands>
</CommandBar>
<TeachingTip
x:Name="Toast"
Title="底部提示"
ActionButtonClick="Toast_ActionButtonClick"
ActionButtonContent="确定"
CloseButtonContent="取消"
IsLightDismissEnabled="True"
PlacementMargin="20"
PreferredPlacement="Auto"
Subtitle="消息"/>
<ContentDialog
x:Name="DownloadDialog"
Title="下载中"
SecondaryButtonText="取消">
<StackPanel>
<TextBlock Name="DownloadDialogText"
Text="下载完成后会自动导入到你配置的模组路径,请勿取消"/>
<ProgressBar Margin="0,6,0,0"
IsIndeterminate="True"/>
</StackPanel>
</ContentDialog>
</Grid>
</windowex:WindowEx>