Drawer korrigiert, Gruppenanlegen optimiert.
This commit is contained in:
@@ -33,7 +33,7 @@ public class App : Application
|
|||||||
{
|
{
|
||||||
// GroupList → GroupDetail
|
// GroupList → GroupDetail
|
||||||
var gl = Services.GetRequiredService<GroupListViewModel>();
|
var gl = Services.GetRequiredService<GroupListViewModel>();
|
||||||
gl.OnNavigateToDetail = id => main.NavigateToGroupDetail(id);
|
gl.OnNavigateToDetail = (id, tab) => main.NavigateToGroupDetail(id, tab);
|
||||||
gl.OnAddGroup = () => ShowAddGroupDialog(gl);
|
gl.OnAddGroup = () => ShowAddGroupDialog(gl);
|
||||||
|
|
||||||
// Dashboard → GroupDetail (Chips)
|
// Dashboard → GroupDetail (Chips)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ public partial class GroupListViewModel : ObservableObject
|
|||||||
private readonly IGroupRepository _groups;
|
private readonly IGroupRepository _groups;
|
||||||
private readonly SchoolYearService _sy;
|
private readonly SchoolYearService _sy;
|
||||||
|
|
||||||
public Action<Guid>? OnNavigateToDetail { get; set; }
|
public Action<Guid, int>? OnNavigateToDetail { get; set; }
|
||||||
public Action? OnAddGroup { get; set; }
|
public Action? OnAddGroup { get; set; }
|
||||||
|
|
||||||
[ObservableProperty] private string _selectedSchoolYear = "";
|
[ObservableProperty] private string _selectedSchoolYear = "";
|
||||||
@@ -33,10 +33,8 @@ public partial class GroupListViewModel : ObservableObject
|
|||||||
|
|
||||||
partial void OnSelectedSchoolYearChanged(string value) => LoadGroups();
|
partial void OnSelectedSchoolYearChanged(string value) => LoadGroups();
|
||||||
partial void OnSearchTextChanged(string value) => LoadGroups();
|
partial void OnSearchTextChanged(string value) => LoadGroups();
|
||||||
partial void OnSelectedGroupChanged(GroupListItem? value)
|
partial void OnSelectedGroupChanged(GroupListItem? value) =>
|
||||||
{
|
NavigateToSectionCommand.NotifyCanExecuteChanged();
|
||||||
if (value is not null) OnNavigateToDetail?.Invoke(value.Id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void LoadGroups()
|
public void LoadGroups()
|
||||||
{
|
{
|
||||||
@@ -51,6 +49,15 @@ public partial class GroupListViewModel : ObservableObject
|
|||||||
|
|
||||||
[RelayCommand] private void AddGroup() => OnAddGroup?.Invoke();
|
[RelayCommand] private void AddGroup() => OnAddGroup?.Invoke();
|
||||||
[RelayCommand] private void Refresh() => LoadGroups();
|
[RelayCommand] private void Refresh() => LoadGroups();
|
||||||
|
|
||||||
|
[RelayCommand(CanExecute = nameof(HasSelectedGroup))]
|
||||||
|
private void NavigateToSection(string? tabIndex)
|
||||||
|
{
|
||||||
|
if (SelectedGroup is null || !int.TryParse(tabIndex, out var tab)) return;
|
||||||
|
OnNavigateToDetail?.Invoke(SelectedGroup.Id, tab);
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool HasSelectedGroup() => SelectedGroup is not null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GroupListItem
|
public class GroupListItem
|
||||||
@@ -61,6 +68,7 @@ public class GroupListItem
|
|||||||
public string DisplayName { get; }
|
public string DisplayName { get; }
|
||||||
public string TypeLabel { get; }
|
public string TypeLabel { get; }
|
||||||
public string GradingLabel { get; }
|
public string GradingLabel { get; }
|
||||||
|
public string Subtitle { get; }
|
||||||
|
|
||||||
public GroupListItem(LearningGroup g)
|
public GroupListItem(LearningGroup g)
|
||||||
{
|
{
|
||||||
@@ -69,7 +77,8 @@ public class GroupListItem
|
|||||||
Subject = g.Subject ?? "";
|
Subject = g.Subject ?? "";
|
||||||
TypeLabel = g.Type == GroupType.Class ? "Klasse" : "Kurs";
|
TypeLabel = g.Type == GroupType.Class ? "Klasse" : "Kurs";
|
||||||
GradingLabel = g.GradingSystem == GradingSystem.Grades1To6 ? "1–6" : "0–15";
|
GradingLabel = g.GradingSystem == GradingSystem.Grades1To6 ? "1–6" : "0–15";
|
||||||
DisplayName = string.IsNullOrEmpty(Subject) ? Name : $"{Name} · {Subject}";
|
DisplayName = string.IsNullOrEmpty(g.Subject) ? g.Name : $"{g.Name} · {g.Subject}";
|
||||||
|
Subtitle = $"{TypeLabel} · Stufe {g.GradeLevel} · Noten {GradingLabel} · {g.SchoolYear}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,6 +95,7 @@ public partial class GroupDetailViewModel : ObservableObject
|
|||||||
[ObservableProperty] private string _groupTitle = "";
|
[ObservableProperty] private string _groupTitle = "";
|
||||||
[ObservableProperty] private string _groupSubtitle = "";
|
[ObservableProperty] private string _groupSubtitle = "";
|
||||||
[ObservableProperty] private int _studentCount;
|
[ObservableProperty] private int _studentCount;
|
||||||
|
[ObservableProperty] private int _activeTabIndex = 0;
|
||||||
|
|
||||||
public ObservableCollection<StudentSummary> Students { get; } = [];
|
public ObservableCollection<StudentSummary> Students { get; } = [];
|
||||||
public ObservableCollection<ExamSummary> Exams { get; } = [];
|
public ObservableCollection<ExamSummary> Exams { get; } = [];
|
||||||
@@ -153,6 +163,20 @@ public partial class AddGroupDialogViewModel : ObservableObject
|
|||||||
private readonly IGroupRepository _groups;
|
private readonly IGroupRepository _groups;
|
||||||
private readonly SchoolYearService _sy;
|
private readonly SchoolYearService _sy;
|
||||||
|
|
||||||
|
public List<string> TypeOptions { get; } = ["Klasse", "Kurs"];
|
||||||
|
[ObservableProperty] private string _selectedTypeName = "Kurs";
|
||||||
|
|
||||||
|
public bool IsKurs => SelectedTypeName == "Kurs";
|
||||||
|
public string NameLabel => IsKurs ? "Kursname *" : "Klassenname *";
|
||||||
|
public string NameHint => IsKurs ? "z.B. Q1, LK, GK" : "z.B. 10E, 5a, 11b";
|
||||||
|
|
||||||
|
partial void OnSelectedTypeNameChanged(string value)
|
||||||
|
{
|
||||||
|
OnPropertyChanged(nameof(IsKurs));
|
||||||
|
OnPropertyChanged(nameof(NameLabel));
|
||||||
|
OnPropertyChanged(nameof(NameHint));
|
||||||
|
}
|
||||||
|
|
||||||
[ObservableProperty] private string _name = "";
|
[ObservableProperty] private string _name = "";
|
||||||
[ObservableProperty] private string _subject = "";
|
[ObservableProperty] private string _subject = "";
|
||||||
[ObservableProperty] private int _gradeLevel = 10;
|
[ObservableProperty] private int _gradeLevel = 10;
|
||||||
@@ -168,7 +192,6 @@ public partial class AddGroupDialogViewModel : ObservableObject
|
|||||||
_groups = groups; _sy = sy;
|
_groups = groups; _sy = sy;
|
||||||
SchoolYears = sy.RecentSchoolYears(3);
|
SchoolYears = sy.RecentSchoolYears(3);
|
||||||
SelectedSchoolYear = sy.CurrentSchoolYear();
|
SelectedSchoolYear = sy.CurrentSchoolYear();
|
||||||
// Notensystem automatisch nach Klassenstufe
|
|
||||||
PropertyChanged += (_, e) =>
|
PropertyChanged += (_, e) =>
|
||||||
{
|
{
|
||||||
if (e.PropertyName == nameof(GradeLevel))
|
if (e.PropertyName == nameof(GradeLevel))
|
||||||
@@ -180,13 +203,13 @@ public partial class AddGroupDialogViewModel : ObservableObject
|
|||||||
[RelayCommand]
|
[RelayCommand]
|
||||||
private void Save()
|
private void Save()
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(Name)) { ValidationMessage = "Name erforderlich."; return; }
|
if (string.IsNullOrWhiteSpace(Name)) { ValidationMessage = "Bezeichnung erforderlich."; return; }
|
||||||
if (GradeLevel is < 1 or > 13) { ValidationMessage = "Klassenstufe 1–13."; return; }
|
if (GradeLevel is < 1 or > 13) { ValidationMessage = "Klassenstufe 1–13."; return; }
|
||||||
Result = new LearningGroup
|
Result = new LearningGroup
|
||||||
{
|
{
|
||||||
Name = Name.Trim(),
|
Name = Name.Trim(),
|
||||||
Subject = string.IsNullOrWhiteSpace(Subject) ? null : Subject.Trim(),
|
Subject = IsKurs && !string.IsNullOrWhiteSpace(Subject) ? Subject.Trim() : null,
|
||||||
Type = GroupType.Course,
|
Type = IsKurs ? GroupType.Course : GroupType.Class,
|
||||||
GradeLevel = GradeLevel,
|
GradeLevel = GradeLevel,
|
||||||
GradingSystem = GradingSystem,
|
GradingSystem = GradingSystem,
|
||||||
SchoolYear = SelectedSchoolYear,
|
SchoolYear = SelectedSchoolYear,
|
||||||
|
|||||||
@@ -40,11 +40,12 @@ public partial class MainWindowViewModel : ObservableObject
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public void NavigateToGroupDetail(Guid groupId)
|
public void NavigateToGroupDetail(Guid groupId, int initialTab = 0)
|
||||||
{
|
{
|
||||||
ActiveNavItem = NavItem.Groups;
|
ActiveNavItem = NavItem.Groups;
|
||||||
var vm = _services.GetRequiredService<GroupDetailViewModel>();
|
var vm = _services.GetRequiredService<GroupDetailViewModel>();
|
||||||
vm.LoadGroup(groupId);
|
vm.LoadGroup(groupId);
|
||||||
|
vm.ActiveTabIndex = initialTab;
|
||||||
CurrentPage = vm;
|
CurrentPage = vm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,14 +10,27 @@
|
|||||||
<Grid RowDefinitions="*,Auto" Margin="24">
|
<Grid RowDefinitions="*,Auto" Margin="24">
|
||||||
<StackPanel Grid.Row="0" Spacing="14">
|
<StackPanel Grid.Row="0" Spacing="14">
|
||||||
<TextBlock Text="Neue Lerngruppe anlegen" FontSize="18" FontWeight="SemiBold"/>
|
<TextBlock Text="Neue Lerngruppe anlegen" FontSize="18" FontWeight="SemiBold"/>
|
||||||
|
|
||||||
|
<!-- Typ: Klasse oder Kurs -->
|
||||||
<StackPanel Spacing="4">
|
<StackPanel Spacing="4">
|
||||||
<TextBlock Text="Name *" FontSize="12" Opacity="0.7"/>
|
<TextBlock Text="Typ *" FontSize="12" Opacity="0.7"/>
|
||||||
<TextBox Text="{Binding Name}" Watermark="z.B. 10E, Q1 Chemie, 5a"/>
|
<ComboBox ItemsSource="{Binding TypeOptions}"
|
||||||
|
SelectedItem="{Binding SelectedTypeName}"
|
||||||
|
HorizontalAlignment="Stretch"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Bezeichnung – Label und Placeholder reagieren auf den Typ -->
|
||||||
<StackPanel Spacing="4">
|
<StackPanel Spacing="4">
|
||||||
<TextBlock Text="Fach" FontSize="12" Opacity="0.7"/>
|
<TextBlock Text="{Binding NameLabel}" FontSize="12" Opacity="0.7"/>
|
||||||
<TextBox Text="{Binding Subject}" Watermark="z.B. Chemie, Mathematik"/>
|
<TextBox Text="{Binding Name}" PlaceholderText="{Binding NameHint}"/>
|
||||||
</StackPanel>
|
</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,*">
|
<Grid ColumnDefinitions="*,12,*">
|
||||||
<StackPanel Grid.Column="0" Spacing="4">
|
<StackPanel Grid.Column="0" Spacing="4">
|
||||||
<TextBlock Text="Klassenstufe *" FontSize="12" Opacity="0.7"/>
|
<TextBlock Text="Klassenstufe *" FontSize="12" Opacity="0.7"/>
|
||||||
@@ -30,9 +43,11 @@
|
|||||||
HorizontalAlignment="Stretch"/>
|
HorizontalAlignment="Stretch"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<TextBlock Text="{Binding ValidationMessage}" Foreground="Red" FontSize="12"
|
<TextBlock Text="{Binding ValidationMessage}" Foreground="Red" FontSize="12"
|
||||||
IsVisible="{Binding ValidationMessage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
IsVisible="{Binding ValidationMessage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<Grid Grid.Row="1" ColumnDefinitions="*,8,*" Margin="0,20,0,0">
|
<Grid Grid.Row="1" ColumnDefinitions="*,8,*" Margin="0,20,0,0">
|
||||||
<Button Grid.Column="0" Content="Abbrechen" HorizontalAlignment="Stretch" Click="OnCancel"/>
|
<Button Grid.Column="0" Content="Abbrechen" HorizontalAlignment="Stretch" Click="OnCancel"/>
|
||||||
<Button Grid.Column="2" Content="Anlegen" HorizontalAlignment="Stretch" Click="OnSave"/>
|
<Button Grid.Column="2" Content="Anlegen" HorizontalAlignment="Stretch" Click="OnSave"/>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
Kein ActiveTab-Property, kein IsVisible-Binding, keine eigenen Tab-Buttons.
|
Kein ActiveTab-Property, kein IsVisible-Binding, keine eigenen Tab-Buttons.
|
||||||
TabPlacement="Top" → Tabs oben (wie Browser-Tabs).
|
TabPlacement="Top" → Tabs oben (wie Browser-Tabs).
|
||||||
-->
|
-->
|
||||||
<TabbedPage Grid.Row="1" TabPlacement="Top">
|
<TabbedPage Grid.Row="1" TabPlacement="Top" SelectedIndex="{Binding ActiveTabIndex}">
|
||||||
|
|
||||||
<!-- Tab: Übersicht -->
|
<!-- Tab: Übersicht -->
|
||||||
<ContentPage Header="Übersicht">
|
<ContentPage Header="Übersicht">
|
||||||
|
|||||||
@@ -5,6 +5,8 @@
|
|||||||
x:DataType="vm:GroupListViewModel">
|
x:DataType="vm:GroupListViewModel">
|
||||||
|
|
||||||
<Grid RowDefinitions="Auto,*">
|
<Grid RowDefinitions="Auto,*">
|
||||||
|
|
||||||
|
<!-- Kopfzeile mit Schuljahr-Wähler und Neu-Button -->
|
||||||
<Border Grid.Row="0" Padding="20,16"
|
<Border Grid.Row="0" Padding="20,16"
|
||||||
BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
|
BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
|
||||||
BorderThickness="0,0,0,1">
|
BorderThickness="0,0,0,1">
|
||||||
@@ -25,39 +27,43 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
|
<!-- Master-Detail: Liste links, Übersicht rechts -->
|
||||||
<Grid Grid.Row="1" ColumnDefinitions="260,*">
|
<Grid Grid.Row="1" ColumnDefinitions="260,*">
|
||||||
|
|
||||||
|
<!-- Linke Spalte: Sucheingabe + Listenansicht -->
|
||||||
<Border Grid.Column="0"
|
<Border Grid.Column="0"
|
||||||
BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
|
BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
|
||||||
BorderThickness="0,0,1,0">
|
BorderThickness="0,0,1,0">
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
<TextBox DockPanel.Dock="Top" Text="{Binding SearchText}"
|
<TextBox DockPanel.Dock="Top" Text="{Binding SearchText}"
|
||||||
PlaceholderText="Suchen…" Margin="12,8"/>
|
PlaceholderText="Suchen…" Margin="12,8"/>
|
||||||
<ListBox ItemsSource="{Binding Groups}"
|
<ListBox ItemsSource="{Binding Groups}"
|
||||||
SelectedItem="{Binding SelectedGroup}">
|
SelectedItem="{Binding SelectedGroup}">
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate DataType="vm:GroupListItem">
|
<DataTemplate DataType="vm:GroupListItem">
|
||||||
<Grid ColumnDefinitions="4,*" Margin="2,4">
|
<Grid ColumnDefinitions="4,*" Margin="2,4">
|
||||||
<Border Grid.Column="0" Width="4" CornerRadius="2"
|
<Border Grid.Column="0" Width="4" CornerRadius="2"
|
||||||
Background="{DynamicResource SystemAccentColor}"
|
Background="{DynamicResource SystemAccentColor}"
|
||||||
Margin="0,0,10,0"/>
|
Margin="0,0,10,0"/>
|
||||||
<StackPanel Grid.Column="1">
|
<StackPanel Grid.Column="1">
|
||||||
<Grid ColumnDefinitions="*,Auto">
|
<Grid ColumnDefinitions="*,Auto">
|
||||||
<TextBlock Grid.Column="0" Text="{Binding Name}"
|
<TextBlock Grid.Column="0" Text="{Binding Name}"
|
||||||
FontWeight="SemiBold" FontSize="13"/>
|
FontWeight="SemiBold" FontSize="13"/>
|
||||||
<TextBlock Grid.Column="1" Text="{Binding TypeLabel}"
|
<TextBlock Grid.Column="1" Text="{Binding TypeLabel}"
|
||||||
FontSize="11" Opacity="0.5"/>
|
FontSize="11" Opacity="0.5"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<TextBlock Text="{Binding Subject}" FontSize="12" Opacity="0.65"
|
<TextBlock Text="{Binding Subject}" FontSize="12" Opacity="0.65"
|
||||||
IsVisible="{Binding Subject, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
IsVisible="{Binding Subject, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
||||||
<TextBlock Text="{Binding GradingLabel}" FontSize="11" Opacity="0.4"/>
|
<TextBlock Text="{Binding GradingLabel}" FontSize="11" Opacity="0.4"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
|
<!-- Rechte Spalte: Platzhalter wenn keine Auswahl -->
|
||||||
<StackPanel Grid.Column="1" HorizontalAlignment="Center"
|
<StackPanel Grid.Column="1" HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" Spacing="8"
|
VerticalAlignment="Center" Spacing="8"
|
||||||
IsVisible="{Binding !SelectedGroup}">
|
IsVisible="{Binding !SelectedGroup}">
|
||||||
@@ -66,6 +72,55 @@
|
|||||||
<TextBlock Text="oder + Neue Gruppe anlegen" FontSize="12" Opacity="0.3"
|
<TextBlock Text="oder + Neue Gruppe anlegen" FontSize="12" Opacity="0.3"
|
||||||
HorizontalAlignment="Center"/>
|
HorizontalAlignment="Center"/>
|
||||||
</StackPanel>
|
</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>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -20,7 +20,31 @@
|
|||||||
Kein eigener Code nötig.
|
Kein eigener Code nötig.
|
||||||
-->
|
-->
|
||||||
<DrawerPage DrawerLength="220"
|
<DrawerPage DrawerLength="220"
|
||||||
DrawerBehavior="Auto">
|
DrawerBehavior="Auto"
|
||||||
|
DrawerLayoutBehavior="CompactInline"
|
||||||
|
|
||||||
|
Content="{Binding CurrentPage}">
|
||||||
|
|
||||||
|
<DrawerPage.DataTemplates>
|
||||||
|
<DataTemplate DataType="vm:DashboardViewModel">
|
||||||
|
<vd:DashboardView/>
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="vmg:GroupListViewModel">
|
||||||
|
<vg:GroupListView/>
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="vmg:GroupDetailViewModel">
|
||||||
|
<vg:GroupDetailView/>
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="vms:StudentListViewModel">
|
||||||
|
<vs:StudentListView/>
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="vms:StudentDetailViewModel">
|
||||||
|
<vs:StudentDetailView/>
|
||||||
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="vm:PlaceholderViewModel">
|
||||||
|
<views:PlaceholderView/>
|
||||||
|
</DataTemplate>
|
||||||
|
</DrawerPage.DataTemplates>
|
||||||
|
|
||||||
<DrawerPage.Drawer>
|
<DrawerPage.Drawer>
|
||||||
<DockPanel>
|
<DockPanel>
|
||||||
@@ -91,29 +115,5 @@
|
|||||||
</DockPanel>
|
</DockPanel>
|
||||||
</DrawerPage.Drawer>
|
</DrawerPage.Drawer>
|
||||||
|
|
||||||
<!-- DataTemplates verbinden ViewModels mit ihren Views -->
|
|
||||||
<ContentControl Content="{Binding CurrentPage}">
|
|
||||||
<ContentControl.DataTemplates>
|
|
||||||
<DataTemplate DataType="vm:DashboardViewModel">
|
|
||||||
<vd:DashboardView/>
|
|
||||||
</DataTemplate>
|
|
||||||
<DataTemplate DataType="vmg:GroupListViewModel">
|
|
||||||
<vg:GroupListView/>
|
|
||||||
</DataTemplate>
|
|
||||||
<DataTemplate DataType="vmg:GroupDetailViewModel">
|
|
||||||
<vg:GroupDetailView/>
|
|
||||||
</DataTemplate>
|
|
||||||
<DataTemplate DataType="vms:StudentListViewModel">
|
|
||||||
<vs:StudentListView/>
|
|
||||||
</DataTemplate>
|
|
||||||
<DataTemplate DataType="vms:StudentDetailViewModel">
|
|
||||||
<vs:StudentDetailView/>
|
|
||||||
</DataTemplate>
|
|
||||||
<DataTemplate DataType="vm:PlaceholderViewModel">
|
|
||||||
<views:PlaceholderView/>
|
|
||||||
</DataTemplate>
|
|
||||||
</ContentControl.DataTemplates>
|
|
||||||
</ContentControl>
|
|
||||||
|
|
||||||
</DrawerPage>
|
</DrawerPage>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
Reference in New Issue
Block a user