Drawer korrigiert, Gruppenanlegen optimiert.
This commit is contained in:
@@ -10,14 +10,27 @@
|
||||
<Grid RowDefinitions="*,Auto" Margin="24">
|
||||
<StackPanel Grid.Row="0" Spacing="14">
|
||||
<TextBlock Text="Neue Lerngruppe anlegen" FontSize="18" FontWeight="SemiBold"/>
|
||||
|
||||
<!-- Typ: Klasse oder Kurs -->
|
||||
<StackPanel Spacing="4">
|
||||
<TextBlock Text="Name *" FontSize="12" Opacity="0.7"/>
|
||||
<TextBox Text="{Binding Name}" Watermark="z.B. 10E, Q1 Chemie, 5a"/>
|
||||
<TextBlock Text="Typ *" FontSize="12" Opacity="0.7"/>
|
||||
<ComboBox ItemsSource="{Binding TypeOptions}"
|
||||
SelectedItem="{Binding SelectedTypeName}"
|
||||
HorizontalAlignment="Stretch"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Bezeichnung – Label und Placeholder reagieren auf den Typ -->
|
||||
<StackPanel Spacing="4">
|
||||
<TextBlock Text="Fach" FontSize="12" Opacity="0.7"/>
|
||||
<TextBox Text="{Binding Subject}" Watermark="z.B. Chemie, Mathematik"/>
|
||||
<TextBlock Text="{Binding NameLabel}" FontSize="12" Opacity="0.7"/>
|
||||
<TextBox Text="{Binding Name}" PlaceholderText="{Binding NameHint}"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Fach – nur bei Kurs relevant -->
|
||||
<StackPanel Spacing="4" IsVisible="{Binding IsKurs}">
|
||||
<TextBlock Text="Fach (optional)" FontSize="12" Opacity="0.7"/>
|
||||
<TextBox Text="{Binding Subject}" PlaceholderText="z.B. Chemie, Mathematik"/>
|
||||
</StackPanel>
|
||||
|
||||
<Grid ColumnDefinitions="*,12,*">
|
||||
<StackPanel Grid.Column="0" Spacing="4">
|
||||
<TextBlock Text="Klassenstufe *" FontSize="12" Opacity="0.7"/>
|
||||
@@ -30,9 +43,11 @@
|
||||
HorizontalAlignment="Stretch"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<TextBlock Text="{Binding ValidationMessage}" Foreground="Red" FontSize="12"
|
||||
IsVisible="{Binding ValidationMessage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||
</StackPanel>
|
||||
|
||||
<Grid Grid.Row="1" ColumnDefinitions="*,8,*" Margin="0,20,0,0">
|
||||
<Button Grid.Column="0" Content="Abbrechen" HorizontalAlignment="Stretch" Click="OnCancel"/>
|
||||
<Button Grid.Column="2" Content="Anlegen" HorizontalAlignment="Stretch" Click="OnSave"/>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
Kein ActiveTab-Property, kein IsVisible-Binding, keine eigenen Tab-Buttons.
|
||||
TabPlacement="Top" → Tabs oben (wie Browser-Tabs).
|
||||
-->
|
||||
<TabbedPage Grid.Row="1" TabPlacement="Top">
|
||||
<TabbedPage Grid.Row="1" TabPlacement="Top" SelectedIndex="{Binding ActiveTabIndex}">
|
||||
|
||||
<!-- Tab: Übersicht -->
|
||||
<ContentPage Header="Übersicht">
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
x:DataType="vm:GroupListViewModel">
|
||||
|
||||
<Grid RowDefinitions="Auto,*">
|
||||
|
||||
<!-- Kopfzeile mit Schuljahr-Wähler und Neu-Button -->
|
||||
<Border Grid.Row="0" Padding="20,16"
|
||||
BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
|
||||
BorderThickness="0,0,0,1">
|
||||
@@ -25,39 +27,43 @@
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- Master-Detail: Liste links, Übersicht rechts -->
|
||||
<Grid Grid.Row="1" ColumnDefinitions="260,*">
|
||||
|
||||
<!-- Linke Spalte: Sucheingabe + Listenansicht -->
|
||||
<Border Grid.Column="0"
|
||||
BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
|
||||
BorderThickness="0,0,1,0">
|
||||
<DockPanel>
|
||||
<TextBox DockPanel.Dock="Top" Text="{Binding SearchText}"
|
||||
PlaceholderText="Suchen…" Margin="12,8"/>
|
||||
<ListBox ItemsSource="{Binding Groups}"
|
||||
SelectedItem="{Binding SelectedGroup}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="vm:GroupListItem">
|
||||
<Grid ColumnDefinitions="4,*" Margin="2,4">
|
||||
<Border Grid.Column="0" Width="4" CornerRadius="2"
|
||||
Background="{DynamicResource SystemAccentColor}"
|
||||
Margin="0,0,10,0"/>
|
||||
<StackPanel Grid.Column="1">
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<TextBlock Grid.Column="0" Text="{Binding Name}"
|
||||
FontWeight="SemiBold" FontSize="13"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding TypeLabel}"
|
||||
FontSize="11" Opacity="0.5"/>
|
||||
</Grid>
|
||||
<TextBlock Text="{Binding Subject}" FontSize="12" Opacity="0.65"
|
||||
IsVisible="{Binding Subject, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||
<TextBlock Text="{Binding GradingLabel}" FontSize="11" Opacity="0.4"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</DockPanel>
|
||||
<DockPanel>
|
||||
<TextBox DockPanel.Dock="Top" Text="{Binding SearchText}"
|
||||
PlaceholderText="Suchen…" Margin="12,8"/>
|
||||
<ListBox ItemsSource="{Binding Groups}"
|
||||
SelectedItem="{Binding SelectedGroup}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate DataType="vm:GroupListItem">
|
||||
<Grid ColumnDefinitions="4,*" Margin="2,4">
|
||||
<Border Grid.Column="0" Width="4" CornerRadius="2"
|
||||
Background="{DynamicResource SystemAccentColor}"
|
||||
Margin="0,0,10,0"/>
|
||||
<StackPanel Grid.Column="1">
|
||||
<Grid ColumnDefinitions="*,Auto">
|
||||
<TextBlock Grid.Column="0" Text="{Binding Name}"
|
||||
FontWeight="SemiBold" FontSize="13"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding TypeLabel}"
|
||||
FontSize="11" Opacity="0.5"/>
|
||||
</Grid>
|
||||
<TextBlock Text="{Binding Subject}" FontSize="12" Opacity="0.65"
|
||||
IsVisible="{Binding Subject, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||
<TextBlock Text="{Binding GradingLabel}" FontSize="11" Opacity="0.4"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Rechte Spalte: Platzhalter wenn keine Auswahl -->
|
||||
<StackPanel Grid.Column="1" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" Spacing="8"
|
||||
IsVisible="{Binding !SelectedGroup}">
|
||||
@@ -66,6 +72,55 @@
|
||||
<TextBlock Text="oder + Neue Gruppe anlegen" FontSize="12" Opacity="0.3"
|
||||
HorizontalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<!-- Rechte Spalte: Gruppen-Übersicht wenn ausgewählt -->
|
||||
<ScrollViewer Grid.Column="1" IsVisible="{Binding SelectedGroup}">
|
||||
<StackPanel Margin="28,24" Spacing="20">
|
||||
|
||||
<!-- Gruppenname und Kurzinfos -->
|
||||
<StackPanel Spacing="4">
|
||||
<TextBlock Text="{Binding SelectedGroup.DisplayName}"
|
||||
FontSize="24" FontWeight="SemiBold" TextWrapping="Wrap"/>
|
||||
<TextBlock Text="{Binding SelectedGroup.Subtitle}"
|
||||
FontSize="12" Opacity="0.55"/>
|
||||
</StackPanel>
|
||||
|
||||
<Separator/>
|
||||
|
||||
<!-- Bereichs-Navigation -->
|
||||
<TextBlock Text="BEREICHE" FontSize="10" FontWeight="Bold"
|
||||
Opacity="0.4" Margin="0,0,0,2"/>
|
||||
<StackPanel Spacing="6">
|
||||
<Button Content="👤 Schülerliste"
|
||||
HorizontalAlignment="Stretch" HorizontalContentAlignment="Left"
|
||||
Padding="12,9"
|
||||
Command="{Binding NavigateToSectionCommand}"
|
||||
CommandParameter="1"/>
|
||||
<Button Content="📝 Klausuren"
|
||||
HorizontalAlignment="Stretch" HorizontalContentAlignment="Left"
|
||||
Padding="12,9"
|
||||
Command="{Binding NavigateToSectionCommand}"
|
||||
CommandParameter="2"/>
|
||||
<Button Content="🔢 Notenübersicht"
|
||||
HorizontalAlignment="Stretch" HorizontalContentAlignment="Left"
|
||||
Padding="12,9"
|
||||
Command="{Binding NavigateToSectionCommand}"
|
||||
CommandParameter="3"/>
|
||||
<Button Content="📅 Unterrichtsplanung"
|
||||
HorizontalAlignment="Stretch" HorizontalContentAlignment="Left"
|
||||
Padding="12,9"
|
||||
Command="{Binding NavigateToSectionCommand}"
|
||||
CommandParameter="4"/>
|
||||
<Button Content="📋 Dokumentation"
|
||||
HorizontalAlignment="Stretch" HorizontalContentAlignment="Left"
|
||||
Padding="12,9"
|
||||
Command="{Binding NavigateToSectionCommand}"
|
||||
CommandParameter="5"/>
|
||||
</StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
Reference in New Issue
Block a user