WIn_RustTools/RustTools/Views/CodeDataPage.xaml

97 lines
4.2 KiB
Plaintext
Raw Normal View History

2024-08-19 14:30:11 +00:00
<?xml version="1.0" encoding="utf-8" ?>
<Page
x:Class="RustTools.Views.CodeDataPage"
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:local1="using:RustTools.Helpers"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<!-- Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" -->
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<CommandBar
Background="Transparent"
DefaultLabelPosition="Right"
IsOpen="False">
<AppBarButton
Click="AppBarButton_Click"
Icon="Add"
Label="添加集"
Tag="0"
ToolTipService.ToolTip="以官方数据集添加项目中" />
<AppBarButton
Click="AppBarButton_Click"
Icon="OpenLocal"
Label="打开"
Tag="1"
ToolTipService.ToolTip="打开数据集文件夹" />
<AppBarButton
Click="AppBarButton_Click"
Label="重置"
Tag="2"
ToolTipService.ToolTip="重置官方数据集数据">
<AppBarButton.Icon>
<FontIcon Glyph="&#xEA86;" />
</AppBarButton.Icon>
</AppBarButton>
</CommandBar>
</StackPanel>
<ListView
x:Name="listview"
Grid.Row="1"
BorderThickness="0"
ItemsSource="{x:Bind DataConfig}"
SelectionChanged="listview_SelectionChanged">
<ListView.ItemTemplate>
<DataTemplate>
<Grid
Margin="0,9,0,9"
Padding="9"
Background="{StaticResource CardBackgroundFillColorDefault}"
CornerRadius="9">
<Grid.Resources>
<local1:NotOfficialConverter x:Key="IsOff" />
</Grid.Resources>
<StackPanel>
<TextBlock Style="{StaticResource BodyStrongTextBlockStyle}" Text="{Binding name}" />
<TextBlock
Margin="0,9,0,0"
Style="{StaticResource BodyTextBlockStyle}"
Text="{Binding describe}" />
<TextBlock Margin="0,3,0,0" Text="{Binding author}" />
<TextBlock Margin="0,1,0,0" Text="{Binding versionName}" />
</StackPanel>
<Grid.ContextFlyout>
<MenuFlyout>
<MenuFlyoutItem Click="MenuFlyoutItem_Click" Text="编辑" />
<MenuFlyoutItem Click="MenuFlyoutItem_Click" Text="删除" />
</MenuFlyout>
</Grid.ContextFlyout>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
<!--<ListView.ItemContainerStyle>
<Style x:Name="ListViewItemNoneStyle" TargetType="ListViewItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListViewItem">
<Grid Background="{TemplateBinding Background}">
<ContentPresenter Margin="{TemplateBinding Padding}" Content="{TemplateBinding Content}" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListView.ItemContainerStyle>-->
</ListView>
</Grid>
</Page>