init 1.0.0
This commit is contained in:
@@ -0,0 +1,119 @@
|
||||
<Window xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="clr-namespace:LehrerApp.Desktop.ViewModels"
|
||||
xmlns:vmg="clr-namespace:LehrerApp.Desktop.ViewModels.Groups"
|
||||
xmlns:vms="clr-namespace:LehrerApp.Desktop.ViewModels.Students"
|
||||
xmlns:views="clr-namespace:LehrerApp.Desktop.Views"
|
||||
xmlns:vd="clr-namespace:LehrerApp.Desktop.Views.Dashboard"
|
||||
xmlns:vg="clr-namespace:LehrerApp.Desktop.Views.Groups"
|
||||
xmlns:vs="clr-namespace:LehrerApp.Desktop.Views.Students"
|
||||
x:Class="LehrerApp.Desktop.Views.MainWindow"
|
||||
x:DataType="vm:MainWindowViewModel"
|
||||
Title="LehrerApp"
|
||||
Width="1280" Height="800"
|
||||
MinWidth="900" MinHeight="600">
|
||||
|
||||
<!--
|
||||
Avalonia 12: DrawerPage ersetzt die selbstgebaute Sidebar.
|
||||
DrawerBreakpointWidth="900" → Sidebar ab 900px dauerhaft sichtbar,
|
||||
darunter als Overlay-Drawer mit Hamburger-Button (automatisch).
|
||||
Kein eigener Code nötig.
|
||||
-->
|
||||
<DrawerPage DrawerLength="220"
|
||||
DrawerBehavior="Auto">
|
||||
|
||||
<DrawerPage.Drawer>
|
||||
<DockPanel>
|
||||
|
||||
<Border DockPanel.Dock="Top" Padding="16,20,16,14"
|
||||
BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
|
||||
BorderThickness="0,0,0,1">
|
||||
<StackPanel>
|
||||
<TextBlock Text="LehrerApp" FontSize="20" FontWeight="SemiBold"/>
|
||||
<TextBlock Text="{Binding CurrentSchoolYear}"
|
||||
FontSize="12" Opacity="0.55" Margin="0,2,0,0"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<Border DockPanel.Dock="Bottom" Padding="12,8"
|
||||
BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
|
||||
BorderThickness="0,1,0,0">
|
||||
<views:SyncStatusBar/>
|
||||
</Border>
|
||||
|
||||
<ScrollViewer>
|
||||
<StackPanel Margin="8,12,8,0" Spacing="2">
|
||||
<Button Content="📊 Dashboard" HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Left" Background="Transparent"
|
||||
Padding="10,8" CornerRadius="6"
|
||||
Command="{Binding NavigateToCommand}"
|
||||
CommandParameter="{x:Static vm:NavItem.Dashboard}"/>
|
||||
|
||||
<TextBlock Text="UNTERRICHT" FontSize="10" FontWeight="Bold"
|
||||
Opacity="0.4" Margin="10,14,0,4"/>
|
||||
|
||||
<Button Content="🏫 Lerngruppen" HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Left" Background="Transparent"
|
||||
Padding="10,8" CornerRadius="6"
|
||||
Command="{Binding NavigateToCommand}"
|
||||
CommandParameter="{x:Static vm:NavItem.Groups}"/>
|
||||
<Button Content="👤 Schüler" HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Left" Background="Transparent"
|
||||
Padding="10,8" CornerRadius="6"
|
||||
Command="{Binding NavigateToCommand}"
|
||||
CommandParameter="{x:Static vm:NavItem.Students}"/>
|
||||
<Button Content="📝 Klausuren" HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Left" Background="Transparent"
|
||||
Padding="10,8" CornerRadius="6"
|
||||
Command="{Binding NavigateToCommand}"
|
||||
CommandParameter="{x:Static vm:NavItem.Exams}"/>
|
||||
<Button Content="📅 Planung" HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Left" Background="Transparent"
|
||||
Padding="10,8" CornerRadius="6"
|
||||
Command="{Binding NavigateToCommand}"
|
||||
CommandParameter="{x:Static vm:NavItem.Planner}"/>
|
||||
|
||||
<TextBlock Text="VERWALTUNG" FontSize="10" FontWeight="Bold"
|
||||
Opacity="0.4" Margin="10,14,0,4"/>
|
||||
|
||||
<Button Content="⏱ Arbeitszeit" HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Left" Background="Transparent"
|
||||
Padding="10,8" CornerRadius="6"
|
||||
Command="{Binding NavigateToCommand}"
|
||||
CommandParameter="{x:Static vm:NavItem.Workload}"/>
|
||||
<Button Content="⚙️ Einstellungen" HorizontalAlignment="Stretch"
|
||||
HorizontalContentAlignment="Left" Background="Transparent"
|
||||
Padding="10,8" CornerRadius="6"
|
||||
Command="{Binding NavigateToCommand}"
|
||||
CommandParameter="{x:Static vm:NavItem.Settings}"/>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
</DockPanel>
|
||||
</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>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user