2024-08-07 02:31:13 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8" ?>
|
|
|
|
<Page
|
|
|
|
x:Class="RustTools.Views.ModulePage"
|
|
|
|
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
2024-08-16 05:15:18 +00:00
|
|
|
xmlns:themes="using:RustTools.Themes"
|
2024-08-16 10:09:19 +00:00
|
|
|
d:DataContext="{d:DesignInstance Type=local:ModulePage}"
|
2024-08-07 02:31:13 +00:00
|
|
|
mc:Ignorable="d">
|
|
|
|
|
|
|
|
<Page.Resources>
|
|
|
|
<!-- 模组 -->
|
|
|
|
<DataTemplate x:Key="RwmodItem">
|
2024-08-24 11:50:04 +00:00
|
|
|
<Grid Background="{ThemeResource SystemColorWindowColor}" CornerRadius="9">
|
2024-08-07 02:31:13 +00:00
|
|
|
<Grid
|
2024-08-08 04:29:27 +00:00
|
|
|
Width="130"
|
|
|
|
Height="160"
|
2024-08-24 11:50:04 +00:00
|
|
|
Padding="9,0,9,9">
|
2024-08-08 04:29:27 +00:00
|
|
|
<Image
|
|
|
|
Width="50"
|
|
|
|
Height="50"
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
Source="/Assets/image/rwmod.svg" />
|
2024-08-16 05:15:18 +00:00
|
|
|
<themes:ButtonIcon
|
2024-08-07 02:31:13 +00:00
|
|
|
HorizontalAlignment="Right"
|
|
|
|
VerticalAlignment="Top"
|
2024-08-16 05:15:18 +00:00
|
|
|
Click="Button_Click"
|
|
|
|
Glyph="" />
|
2024-08-07 02:31:13 +00:00
|
|
|
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Bottom">
|
2024-08-08 04:29:27 +00:00
|
|
|
<TextBlock
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
Style="{StaticResource BodyTextBlockStyle}"
|
|
|
|
Text="{Binding Name}"
|
|
|
|
TextWrapping="NoWrap" />
|
|
|
|
<TextBlock
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
Style="{StaticResource CaptionTextBlockStyle}"
|
|
|
|
Text="{Binding Info}"
|
|
|
|
TextWrapping="NoWrap" />
|
2024-08-07 02:31:13 +00:00
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
2024-08-24 11:50:04 +00:00
|
|
|
</Grid>
|
2024-08-07 02:31:13 +00:00
|
|
|
</DataTemplate>
|
|
|
|
<!-- 文件夹 -->
|
|
|
|
<DataTemplate x:Key="FolderItem">
|
2024-08-24 11:50:04 +00:00
|
|
|
<Grid
|
2024-08-08 04:29:27 +00:00
|
|
|
Background="{ThemeResource SystemColorWindowColor}"
|
|
|
|
CornerRadius="9"
|
|
|
|
ToolTipService.ToolTip="{Binding Info}">
|
2024-08-24 11:50:04 +00:00
|
|
|
<Grid.ContextFlyout>
|
2024-08-07 02:31:13 +00:00
|
|
|
<MenuFlyout>
|
2024-08-24 11:50:04 +00:00
|
|
|
<MenuFlyoutItem
|
|
|
|
IsEnabled="False"
|
|
|
|
Text="打开"
|
|
|
|
ToolTipService.ToolTip="制作中···" />
|
2024-08-16 10:09:19 +00:00
|
|
|
<MenuFlyoutItem Click="Button_Rwmod" Text="打包" />
|
2024-08-07 02:31:13 +00:00
|
|
|
<MenuFlyoutItem Text="发布" />
|
|
|
|
<MenuFlyoutItem Click="Button_Delete" Text="删除" />
|
|
|
|
</MenuFlyout>
|
2024-08-24 11:50:04 +00:00
|
|
|
</Grid.ContextFlyout>
|
2024-08-07 02:31:13 +00:00
|
|
|
<Grid
|
2024-08-08 04:29:27 +00:00
|
|
|
Width="130"
|
|
|
|
Height="160"
|
2024-08-07 02:31:13 +00:00
|
|
|
Padding="9">
|
2024-08-08 04:29:27 +00:00
|
|
|
<Image
|
|
|
|
Width="50"
|
|
|
|
Height="50"
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
Source="{Binding Icon}" />
|
2024-08-07 02:31:13 +00:00
|
|
|
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Bottom">
|
2024-08-08 04:29:27 +00:00
|
|
|
<TextBlock
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
Style="{StaticResource BodyTextBlockStyle}"
|
|
|
|
Text="{Binding Name}"
|
|
|
|
TextWrapping="NoWrap" />
|
|
|
|
<TextBlock
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
Style="{StaticResource CaptionTextBlockStyle}"
|
|
|
|
Text="{Binding Info}"
|
|
|
|
TextWrapping="NoWrap" />
|
2024-08-07 02:31:13 +00:00
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
2024-08-24 11:50:04 +00:00
|
|
|
</Grid>
|
2024-08-07 02:31:13 +00:00
|
|
|
</DataTemplate>
|
|
|
|
|
|
|
|
|
|
|
|
<CommandBarFlyout x:Name="CommandBarFlyout1" Placement="Right">
|
|
|
|
<AppBarButton
|
|
|
|
Icon="Share"
|
|
|
|
Label="分享"
|
|
|
|
ToolTipService.ToolTip="分享" />
|
|
|
|
<AppBarButton
|
2024-08-08 04:29:27 +00:00
|
|
|
Click="Button_Delete"
|
2024-08-07 02:31:13 +00:00
|
|
|
Icon="Delete"
|
|
|
|
Label="删除"
|
|
|
|
ToolTipService.ToolTip="删除" />
|
|
|
|
<CommandBarFlyout.SecondaryCommands>
|
|
|
|
<AppBarButton Label="重命名" />
|
|
|
|
</CommandBarFlyout.SecondaryCommands>
|
|
|
|
</CommandBarFlyout>
|
|
|
|
</Page.Resources>
|
|
|
|
<Grid Margin="16">
|
2024-08-08 04:29:27 +00:00
|
|
|
|
2024-08-07 02:31:13 +00:00
|
|
|
<GridView
|
|
|
|
x:Name="BasicGridView"
|
2024-08-24 11:50:04 +00:00
|
|
|
AllowDrop="True"
|
|
|
|
CanReorderItems="True"
|
|
|
|
DoubleTapped="BasicGridView_DoubleTapped"
|
|
|
|
IsItemClickEnabled="True"
|
2024-08-08 04:29:27 +00:00
|
|
|
ItemsSource="{x:Bind ViewModel.ListMod}"
|
2024-08-24 11:50:04 +00:00
|
|
|
SelectionMode="Single">
|
2024-08-07 02:31:13 +00:00
|
|
|
<GridView.ItemTemplateSelector>
|
|
|
|
<local:MyItemTemplateSelector Template1="{StaticResource RwmodItem}" Template2="{StaticResource FolderItem}" />
|
|
|
|
</GridView.ItemTemplateSelector>
|
2024-08-24 11:50:04 +00:00
|
|
|
<GridView.ItemContainerStyle>
|
|
|
|
<Style TargetType="GridViewItem">
|
|
|
|
<Setter Property="Margin" Value="6" />
|
|
|
|
</Style>
|
|
|
|
</GridView.ItemContainerStyle>
|
2024-08-07 02:31:13 +00:00
|
|
|
</GridView>
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
</Page>
|