110 lines
4.1 KiB
XML
110 lines
4.1 KiB
XML
<Window xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="clr-namespace:LehrerApp.Desktop.ViewModels.Groups"
|
|
x:Class="LehrerApp.Desktop.Views.Groups.AddGroupDialog"
|
|
x:DataType="vm:AddGroupDialogViewModel"
|
|
Title="Neue Lerngruppe"
|
|
Width="420" Height="480"
|
|
CanResize="False"
|
|
WindowStartupLocation="CenterOwner">
|
|
|
|
<Grid RowDefinitions="*,Auto" Margin="24">
|
|
|
|
<StackPanel Grid.Row="0" Spacing="16">
|
|
|
|
<TextBlock Text="Neue Lerngruppe anlegen"
|
|
FontSize="18" FontWeight="SemiBold"/>
|
|
|
|
<!-- Name -->
|
|
<StackPanel Spacing="4">
|
|
<TextBlock Text="Name *" FontSize="12" Opacity="0.7"/>
|
|
<TextBox Text="{Binding Name}"
|
|
Watermark="z.B. 10E, Q1 Chemie, 5a"/>
|
|
</StackPanel>
|
|
|
|
<!-- Fach -->
|
|
<StackPanel Spacing="4">
|
|
<TextBlock Text="Fach" FontSize="12" Opacity="0.7"/>
|
|
<TextBox Text="{Binding Subject}"
|
|
Watermark="z.B. Chemie, Mathematik"/>
|
|
</StackPanel>
|
|
|
|
<!-- Typ und Klassenstufe nebeneinander -->
|
|
<Grid ColumnDefinitions="*,12,*">
|
|
<StackPanel Grid.Column="0" Spacing="4">
|
|
<TextBlock Text="Typ" FontSize="12" Opacity="0.7"/>
|
|
<ComboBox ItemsSource="{Binding GroupTypes}"
|
|
SelectedItem="{Binding Type}"
|
|
HorizontalAlignment="Stretch">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate DataType="vm:GroupTypeItem">
|
|
<TextBlock Text="{Binding Label}"/>
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
</StackPanel>
|
|
|
|
<StackPanel Grid.Column="2" Spacing="4">
|
|
<TextBlock Text="Klassenstufe *" FontSize="12" Opacity="0.7"/>
|
|
<NumericUpDown Value="{Binding GradeLevel}"
|
|
Minimum="1" Maximum="13"
|
|
FormatString="0"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
<!-- Notensystem und Schuljahr -->
|
|
<Grid ColumnDefinitions="*,12,*">
|
|
<StackPanel Grid.Column="0" Spacing="4">
|
|
<TextBlock Text="Notensystem" FontSize="12" Opacity="0.7"/>
|
|
<ComboBox ItemsSource="{Binding GradingSystems}"
|
|
SelectedItem="{Binding GradingSystem}"
|
|
HorizontalAlignment="Stretch">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate DataType="vm:GradingSystemItem">
|
|
<TextBlock Text="{Binding Label}" TextWrapping="Wrap"/>
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
</StackPanel>
|
|
|
|
<StackPanel Grid.Column="2" Spacing="4">
|
|
<TextBlock Text="Schuljahr" FontSize="12" Opacity="0.7"/>
|
|
<ComboBox ItemsSource="{Binding SchoolYears}"
|
|
SelectedItem="{Binding SelectedSchoolYear}"
|
|
HorizontalAlignment="Stretch"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
<!-- Wochenstunden -->
|
|
<StackPanel Spacing="4">
|
|
<TextBlock Text="Wochenstunden (optional)" FontSize="12" Opacity="0.7"/>
|
|
<NumericUpDown Value="{Binding HoursPerWeek}"
|
|
Minimum="1" Maximum="20"
|
|
FormatString="0"
|
|
AllowSpin="True"/>
|
|
</StackPanel>
|
|
|
|
<!-- Validierungsfehler -->
|
|
<TextBlock Text="{Binding ValidationMessage}"
|
|
Foreground="Red" FontSize="12"
|
|
IsVisible="{Binding ValidationMessage,
|
|
Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
|
|
|
</StackPanel>
|
|
|
|
<!-- ── Buttons ──────────────────────────────────────────────────────── -->
|
|
<Grid Grid.Row="1" ColumnDefinitions="*,8,*" Margin="0,16,0,0">
|
|
<Button Grid.Column="0"
|
|
Content="Abbrechen"
|
|
HorizontalAlignment="Stretch"
|
|
Click="OnCancel"/>
|
|
<Button Grid.Column="2"
|
|
Content="Anlegen"
|
|
HorizontalAlignment="Stretch"
|
|
Click="OnSave"/>
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</Window>
|