<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:shell="clr-namespace:NewLife.XCoder.Shell"
xmlns:loc="using:NewLife.XCoder.Services"
x:Class="NewLife.XCoder.Shell.CommandPaletteWindow"
Title="{loc:Tr 'Command Palette'}"
Width="640" Height="460"
CanResize="False"
ShowInTaskbar="False"
WindowStartupLocation="CenterOwner"
Background="{DynamicResource BgSurface}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Border BorderBrush="{DynamicResource BorderDefault}" BorderThickness="0,0,0,1"
Padding="14,8">
<TextBox Name="Input" PlaceholderText="{loc:Tr 'Search tools or type a command…'}"
FontSize="16" BorderThickness="0" Background="Transparent" />
</Border>
<ListBox Name="List" Grid.Row="1" Margin="8">
<ListBox.ItemTemplate>
<DataTemplate x:DataType="shell:ToolDescriptor">
<StackPanel Spacing="2" Margin="4,4">
<TextBlock Text="{Binding DisplayTitle}" FontSize="13" FontWeight="SemiBold" />
<TextBlock Text="{Binding DisplayDescription}" FontSize="10"
Foreground="{DynamicResource TextTertiary}"
TextTrimming="CharacterEllipsis" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<TextBlock Grid.Row="2" Margin="16,6" FontSize="10"
Foreground="{DynamicResource TextTertiary}"
Text="{loc:Tr '↑↓ Select · Enter Open · Esc Close'}" />
</Grid>
</Window>
|