Files
FileTime2/src/GuiApp/Avalonia/FileTime.GuiApp/Views/CommandPalette.axaml

32 lines
1.2 KiB
XML

<UserControl
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d"
x:Class="FileTime.GuiApp.Views.CommandPalette"
xmlns="https://github.com/avaloniaui"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<UserControl.Styles>
<StyleInclude Source="avares://FileTime.GuiApp/Resources/Styles.axaml" />
</UserControl.Styles>
<Grid RowDefinitions="Auto,*">
<TextBox
KeyDown="Search_OnKeyDown"
Text="{Binding SearchText, Mode=TwoWay}"
x:Name="SearchTextBox" />
<ListBox
Classes="CommandPalette"
Grid.Row="1"
ItemsSource="{Binding FilteredMatches}"
SelectedItem="{Binding SelectedItem}">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Margin="5">
<TextBlock Text="{Binding Identifier}" />
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</Grid>
</UserControl>