24 lines
1.4 KiB
XML
24 lines
1.4 KiB
XML
<Window xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="using:Lagerprogramm.ViewModels"
|
|
xmlns:m="using:Lagerprogramm.Models"
|
|
x:Class="Lagerprogramm.Views.AdditionSearchDialog"
|
|
x:DataType="vm:AdditionSearchDialogViewModel"
|
|
Title= "Search Additions" Background="{StaticResource ThemeBackgroundBrush}" Width="800" Height="600"
|
|
WindowStartupLocation="CenterOwner">
|
|
<Grid RowDefinitions="Auto,*" Background="{StaticResource ThemeBackgroundBrush}" Margin="10">
|
|
<TextBox Grid.Row="0" Background="{StaticResource ThemeSurfaceBrush}" Text="{Binding SearchText}" Foreground="{StaticResource ThemeForegroundBrush}" PlaceholderText="Fuzzy search..." Margin="0,0,0,10"/>
|
|
<ListBox Grid.Row="1" Background="{StaticResource ThemeSurfaceBrush}" ItemsSource="{Binding FilteredAdditions}" SelectedItem="{Binding SelectedAddition}" DoubleTapped="OnDoubleTapped" x:Name="AdditionListBox">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate x:DataType="m:Addition">
|
|
<StackPanel>
|
|
<TextBlock Text="{Binding Date, StringFormat='{}{0:yyyy-MM-dd HH:mm}'}" Classes="subheader"/>
|
|
<TextBlock Text="{Binding Comment}" Classes="caption"/>
|
|
<TextBlock Text="{Binding Lines.Count, StringFormat='{}{0} parts'}" Classes="captionMuted"/>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</Grid>
|
|
</Window>
|