25 lines
1.5 KiB
XML
25 lines
1.5 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.PartSearchDialog"
|
|
x:DataType="vm:PartSearchDialogViewModel"
|
|
Title="Search Parts" Width="800" Height="600" Background="{StaticResource ThemeBackgroundBrush}"
|
|
WindowStartupLocation="CenterOwner">
|
|
<Grid RowDefinitions="Auto,*" Margin="10" Background="{StaticResource ThemeBackgroundBrush}">
|
|
<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 FilteredParts}" SelectedItem="{Binding SelectedPart}" DoubleTapped="OnDoubleTapped" x:Name="PartListBox">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate x:DataType="m:Part">
|
|
<StackPanel>
|
|
<TextBlock Text="{Binding InternalPartNumber}" Classes="subheader"/>
|
|
<TextBlock Text="{Binding ManufacturerPartNumber}" Classes="caption"/>
|
|
<TextBlock Text="{Binding Manufacturer}" Classes="captionMedium"/>
|
|
<TextBlock Text="{Binding Description}" Classes="captionMuted"/>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
</Grid>
|
|
</Window>
|