120 lines
4.8 KiB
XML
120 lines
4.8 KiB
XML
<?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"
|
|
xmlns:themes="using:RustTools.Themes"
|
|
d:DataContext="{d:DesignInstance Type=local:ModulePage}"
|
|
mc:Ignorable="d">
|
|
|
|
<Page.Resources>
|
|
<!-- 模组 -->
|
|
<DataTemplate x:Key="RwmodItem">
|
|
<Button
|
|
Background="{ThemeResource SystemColorWindowColor}"
|
|
Click="Button_Click_RwmodItem"
|
|
CornerRadius="9">
|
|
<Grid
|
|
Width="130"
|
|
Height="160"
|
|
Padding="9">
|
|
<Image
|
|
Width="50"
|
|
Height="50"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Source="/Assets/image/rwmod.svg" />
|
|
<themes:ButtonIcon
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Top"
|
|
Click="Button_Click"
|
|
Glyph="" />
|
|
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Bottom">
|
|
<TextBlock
|
|
HorizontalAlignment="Center"
|
|
Style="{StaticResource BodyTextBlockStyle}"
|
|
Text="{Binding Name}"
|
|
TextWrapping="NoWrap" />
|
|
<TextBlock
|
|
HorizontalAlignment="Center"
|
|
Style="{StaticResource CaptionTextBlockStyle}"
|
|
Text="{Binding Info}"
|
|
TextWrapping="NoWrap" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Button>
|
|
</DataTemplate>
|
|
<!-- 文件夹 -->
|
|
<DataTemplate x:Key="FolderItem">
|
|
<Button
|
|
Background="{ThemeResource SystemColorWindowColor}"
|
|
CornerRadius="9"
|
|
ToolTipService.ToolTip="{Binding Info}">
|
|
<Button.Flyout>
|
|
<MenuFlyout>
|
|
<MenuFlyoutItem Text="打开" />
|
|
<MenuFlyoutItem Click="Button_Rwmod" Text="打包" />
|
|
<MenuFlyoutItem Text="发布" />
|
|
<MenuFlyoutItem Click="Button_Delete" Text="删除" />
|
|
</MenuFlyout>
|
|
</Button.Flyout>
|
|
<Grid
|
|
Width="130"
|
|
Height="160"
|
|
Padding="9">
|
|
<Image
|
|
Width="50"
|
|
Height="50"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Source="{Binding Icon}" />
|
|
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Bottom">
|
|
<TextBlock
|
|
HorizontalAlignment="Center"
|
|
Style="{StaticResource BodyTextBlockStyle}"
|
|
Text="{Binding Name}"
|
|
TextWrapping="NoWrap" />
|
|
<TextBlock
|
|
HorizontalAlignment="Center"
|
|
Style="{StaticResource CaptionTextBlockStyle}"
|
|
Text="{Binding Info}"
|
|
TextWrapping="NoWrap" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Button>
|
|
</DataTemplate>
|
|
|
|
|
|
<CommandBarFlyout x:Name="CommandBarFlyout1" Placement="Right">
|
|
<AppBarButton
|
|
Icon="Share"
|
|
Label="分享"
|
|
ToolTipService.ToolTip="分享" />
|
|
<AppBarButton
|
|
Click="Button_Delete"
|
|
Icon="Delete"
|
|
Label="删除"
|
|
ToolTipService.ToolTip="删除" />
|
|
<CommandBarFlyout.SecondaryCommands>
|
|
<AppBarButton Label="重命名" />
|
|
</CommandBarFlyout.SecondaryCommands>
|
|
</CommandBarFlyout>
|
|
</Page.Resources>
|
|
<Grid Margin="16">
|
|
|
|
<GridView
|
|
x:Name="BasicGridView"
|
|
IsItemClickEnabled="False"
|
|
ItemsSource="{x:Bind ViewModel.ListMod}"
|
|
SelectionMode="None">
|
|
<GridView.ItemTemplateSelector>
|
|
<local:MyItemTemplateSelector Template1="{StaticResource RwmodItem}" Template2="{StaticResource FolderItem}" />
|
|
</GridView.ItemTemplateSelector>
|
|
</GridView>
|
|
</Grid>
|
|
|
|
</Page>
|