buechermarkt/BuechermarktClient/Books.xaml
Fabian Stamm 51d1119776 Fixed Several bugs;
Book Labels are now searchable in many ways
Server broadcast apamming fixed
2017-06-27 21:54:13 +02:00

51 lines
2.8 KiB
XML

<Window x:Class="BuechermarktClient.Books"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:BuechermarktClient"
mc:Ignorable="d"
Title="Books" Height="300" Width="600">
<Window.Resources>
<local:EnumConverter x:Key="EnumConverter"/>
<local:StudentConverter x:Key="StudentConverter"/>
<local:BookTypeConverter x:Key="BookTypeConverter"/>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="Auto"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Label Content="Search:" Grid.Column="0"></Label>
<TextBox Grid.Column="1" Text="{Binding SearchField, Mode=OneWayToSource}"></TextBox>
<Button Content="S" Grid.Column="2" Width="25" Click="Search_Click"/>
</Grid>
<ListView Grid.Row="1" Margin="0,0,0,0" Name="BooksList">
<ListView.View>
<GridView>
<GridViewColumn Header="Status" DisplayMemberBinding="{Binding Path=State, Converter={StaticResource EnumConverter}}" Width="Auto"></GridViewColumn>
<GridViewColumn Header="Label" DisplayMemberBinding="{Binding LabelId}" Width="Auto"></GridViewColumn>
<GridViewColumn Header="Preis" DisplayMemberBinding="{Binding Price}" Width="Auto"></GridViewColumn>
<GridViewColumn Header="Schüler" DisplayMemberBinding="{Binding Path=Student, Converter={StaticResource StudentConverter}}" Width="Auto"></GridViewColumn>
<GridViewColumn Header="Buchtyp" DisplayMemberBinding="{Binding Path=BookType, Converter={StaticResource BookTypeConverter}}" Width="Auto"></GridViewColumn>
</GridView>
</ListView.View>
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<EventSetter Event="PreviewMouseDoubleClick" Handler="ListViewItem_PreviewMouseUp"></EventSetter>
</Style>
</ListView.ItemContainerStyle>
</ListView>
<Button Grid.Row="2" Content="Hinzufügen" VerticalAlignment="Center" Click="AddNew_Click">
</Button>
</Grid>
</Window>