Files
cmerkens a1c4324cd1 Save
2025-01-10 21:29:02 +01:00

62 lines
2.8 KiB
XML

<Window x:Class="Client.Views.MainWindow"
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:Client.Views"
mc:Ignorable="d"
Title="GameVerwaltung" Height="450" Width="800">
<Grid>
<Grid.RowDefinitions>
<!-- ListBox nimmt den oberen Teil ein -->
<RowDefinition Height="*" />
<!-- Buttons sind unten -->
<RowDefinition Height="40" />
</Grid.RowDefinitions>
<!-- ListBox in der oberen Zeile -->
<ListBox Grid.Row="0" Margin="10" Name="GameListBox"
ItemsSource="{Binding Models}"
SelectedItem="{Binding SelectedModel}">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel>
<!-- Titel -->
<TextBlock>
<Run Text="Titel: " FontWeight="Bold"/>
<LineBreak/>
<Run Text="{Binding Titel}"/>
</TextBlock>
<!-- Zustand -->
<TextBlock>
<Run Text="Zustand: " FontWeight="Bold"/>
<Run Text="{Binding Zustand}"/>
</TextBlock>
<!-- Kommentar -->
<TextBlock>
<Run Text="Kommentar: " FontWeight="Bold"/>
<LineBreak/>
<Run Text="{Binding Kommentar}"/>
</TextBlock>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<!-- StackPanel in der unteren Zeile für die Buttons -->
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Content="Neu" Width="100" Margin="5" Command="{Binding AddCommand}"/>
<Button Content="Bearbeiten" Width="100" Margin="5" Command="{Binding EditCommand}"/>
<Button Content="Löschen" Width="100" Margin="5" Command="{Binding DeleteCommand}"/>
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left">
<Button Content="Importieren" Width="100" Margin="5" Command="{Binding ImportCommand}"/>
<Button Content="Exportieren" Width="100" Margin="5" Command="{Binding ExportCommand}"/>
<Button Content="Aktualisieren" Width="100" Margin="5" Command="{Binding ReloadCommand}"/>
</StackPanel>
</Grid>
</Window>