2024-08-17 06:41:34 +00:00
|
|
|
<?xml version="1.0" encoding="utf-8" ?>
|
|
|
|
<Page
|
|
|
|
x:Class="RustTools.Views.CodeTablePage"
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
2024-08-19 14:30:11 +00:00
|
|
|
xmlns:controls="using:CommunityToolkit.WinUI.Controls"
|
2024-08-17 06:41:34 +00:00
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
2024-08-19 14:30:11 +00:00
|
|
|
xmlns:datalist="using:RustTools.DataList"
|
2024-08-17 06:41:34 +00:00
|
|
|
xmlns:local="using:RustTools.Views"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
2024-08-19 14:30:11 +00:00
|
|
|
xmlns:themes="using:RustTools.Themes"
|
2024-08-17 06:41:34 +00:00
|
|
|
mc:Ignorable="d">
|
|
|
|
|
2024-08-19 14:30:11 +00:00
|
|
|
<Grid>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto" />
|
|
|
|
<RowDefinition Height="*" />
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<StackPanel Grid.Row="0" Margin="0,0,0,9">
|
|
|
|
<AutoSuggestBox
|
|
|
|
x:Name="search"
|
|
|
|
QueryIcon="Find"
|
|
|
|
SuggestionChosen="AutoSuggestBox_SuggestionChosen"
|
|
|
|
TextChanged="search_TextChanged" />
|
|
|
|
</StackPanel>
|
|
|
|
<Grid Grid.Row="1" Grid.Column="0">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<ListView
|
|
|
|
x:Name="keyListView"
|
|
|
|
Grid.Column="0"
|
|
|
|
MinWidth="100"
|
|
|
|
MaxWidth="260"
|
|
|
|
Padding="0,0,9,0"
|
|
|
|
ItemsSource="{x:Bind codeList}"
|
|
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
|
|
|
SelectionChanged="keyListView_SelectionChanged">
|
|
|
|
|
|
|
|
<ListView.ItemTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<StackPanel Padding="6">
|
|
|
|
<TextBlock
|
|
|
|
FontFamily="Body"
|
|
|
|
Style="{StaticResource BodyTextStyle}"
|
|
|
|
Text="{Binding CnKey}" />
|
|
|
|
<TextBlock Style="{StaticResource BodyTextBlockStyle}" Text="{Binding Key}" />
|
|
|
|
<TextBlock
|
|
|
|
Margin="0,3,0,0"
|
|
|
|
FontFamily="Times New Roman"
|
|
|
|
FontSize="12">
|
|
|
|
<Run FontFamily="Thin" Text="共" />
|
|
|
|
<Run FontFamily="Thin" Text="{Binding Vaule.Count}" />
|
|
|
|
<Run FontFamily="Thin" Text="个代码" />
|
|
|
|
</TextBlock>
|
|
|
|
</StackPanel>
|
|
|
|
</DataTemplate>
|
|
|
|
</ListView.ItemTemplate>
|
|
|
|
</ListView>
|
|
|
|
<controls:ContentSizer Grid.Column="1" TargetControl="{x:Bind keyListView}" />
|
|
|
|
<ListView
|
|
|
|
x:Name="valueListView"
|
|
|
|
Grid.Column="2"
|
|
|
|
SelectionMode="None">
|
|
|
|
<ListView.ItemTemplate>
|
|
|
|
<DataTemplate x:DataType="datalist:CodeTable_Data">
|
|
|
|
<Grid
|
|
|
|
Margin="0,0,0,9"
|
|
|
|
Padding="13"
|
|
|
|
Background="{StaticResource CardBackgroundFillColorDefault}"
|
|
|
|
CornerRadius="9">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="*" />
|
|
|
|
<ColumnDefinition Width="Auto" />
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<StackPanel Grid.Column="0">
|
|
|
|
|
|
|
|
<TextBlock
|
|
|
|
Foreground="{StaticResource AccentTextFillColorTertiaryBrush}"
|
|
|
|
Style="{StaticResource SubtitleTextBlockStyle}"
|
|
|
|
Text="{Binding translate}" />
|
|
|
|
<TextBlock
|
|
|
|
Margin="0,9,0,0"
|
|
|
|
Foreground="{StaticResource TextFillColorTertiaryBrush}"
|
|
|
|
IsTextSelectionEnabled="True"
|
|
|
|
Text="{Binding code}" />
|
|
|
|
<TextBlock
|
|
|
|
Margin="0,9,0,0"
|
|
|
|
IsTextSelectionEnabled="True"
|
|
|
|
Style="{StaticResource BodyTextBlockStyle}"
|
|
|
|
Text="{Binding description}" />
|
|
|
|
<TextBlock
|
|
|
|
Margin="0,9,0,0"
|
|
|
|
Foreground="{StaticResource TextFillColorTertiaryBrush}"
|
|
|
|
IsTextSelectionEnabled="True"
|
|
|
|
Style="{StaticResource BodyTextBlockStyle}"
|
|
|
|
Text="{Binding type}" />
|
|
|
|
</StackPanel>
|
|
|
|
<themes:ButtonIcon
|
|
|
|
Grid.Column="1"
|
|
|
|
VerticalAlignment="Top"
|
|
|
|
Click="List_ButtonIcon_Click"
|
|
|
|
Glyph="" />
|
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</ListView.ItemTemplate>
|
|
|
|
</ListView>
|
|
|
|
<TeachingTip
|
|
|
|
x:Name="ToggleThemeTeachingTip1"
|
|
|
|
Title="示例"
|
|
|
|
IsLightDismissEnabled="True">
|
|
|
|
<TeachingTip.Content>
|
|
|
|
<TextBlock
|
|
|
|
x:Name="ToastTextBlock"
|
|
|
|
Margin="0,16,0,0"
|
|
|
|
IsTextSelectionEnabled="True" />
|
|
|
|
</TeachingTip.Content>
|
|
|
|
|
|
|
|
</TeachingTip>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
2024-08-17 06:41:34 +00:00
|
|
|
</Page>
|