Initial
This commit is contained in:
108
LehrerApp.Desktop/Views/MainWindow.axaml
Normal file
108
LehrerApp.Desktop/Views/MainWindow.axaml
Normal file
@@ -0,0 +1,108 @@
|
||||
<Window xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="clr-namespace:LehrerApp.Desktop.ViewModels"
|
||||
xmlns:views="clr-namespace:LehrerApp.Desktop.Views"
|
||||
x:Class="LehrerApp.Desktop.Views.MainWindow"
|
||||
x:DataType="vm:MainWindowViewModel"
|
||||
Title="LehrerApp"
|
||||
Width="1280" Height="800"
|
||||
MinWidth="900" MinHeight="600">
|
||||
|
||||
<Grid ColumnDefinitions="220,*">
|
||||
|
||||
<!-- ── Sidebar ───────────────────────────────────────────────────────── -->
|
||||
<Border Grid.Column="0"
|
||||
Background="{DynamicResource SystemControlBackgroundAltHighBrush}"
|
||||
BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
|
||||
BorderThickness="0,0,1,0">
|
||||
|
||||
<DockPanel>
|
||||
|
||||
<!-- Header -->
|
||||
<Border DockPanel.Dock="Top" Padding="16,20,16,12"
|
||||
BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
|
||||
BorderThickness="0,0,0,1">
|
||||
<StackPanel>
|
||||
<TextBlock Text="LehrerApp"
|
||||
FontSize="20" FontWeight="SemiBold" />
|
||||
<TextBlock Text="{Binding CurrentSchoolYear, FallbackValue=''}"
|
||||
FontSize="12" Opacity="0.6" Margin="0,2,0,0"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Sync-Status unten -->
|
||||
<Border DockPanel.Dock="Bottom" Padding="12,8"
|
||||
BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
|
||||
BorderThickness="0,1,0,0">
|
||||
<views:SyncStatusBar />
|
||||
</Border>
|
||||
|
||||
<!-- Nav-Items -->
|
||||
<StackPanel Margin="8,12">
|
||||
<views:NavButton Icon="" Label="Dashboard"
|
||||
Item="Dashboard"
|
||||
ActiveItem="{Binding ActiveNavItem}"
|
||||
Command="{Binding NavigateToCommand}"
|
||||
CommandParameter="{x:Static vm:NavItem.Dashboard}" />
|
||||
|
||||
<TextBlock Text="UNTERRICHT" FontSize="10" FontWeight="Bold"
|
||||
Opacity="0.4" Margin="8,16,0,4" />
|
||||
|
||||
<views:NavButton Icon="" Label="Lerngruppen"
|
||||
Item="Groups"
|
||||
ActiveItem="{Binding ActiveNavItem}"
|
||||
Command="{Binding NavigateToCommand}"
|
||||
CommandParameter="{x:Static vm:NavItem.Groups}" />
|
||||
|
||||
<views:NavButton Icon="" Label="Schüler"
|
||||
Item="Students"
|
||||
ActiveItem="{Binding ActiveNavItem}"
|
||||
Command="{Binding NavigateToCommand}"
|
||||
CommandParameter="{x:Static vm:NavItem.Students}" />
|
||||
|
||||
<views:NavButton Icon="" Label="Klausuren"
|
||||
Item="Exams"
|
||||
ActiveItem="{Binding ActiveNavItem}"
|
||||
Command="{Binding NavigateToCommand}"
|
||||
CommandParameter="{x:Static vm:NavItem.Exams}" />
|
||||
|
||||
<views:NavButton Icon="" Label="Planung"
|
||||
Item="Planner"
|
||||
ActiveItem="{Binding ActiveNavItem}"
|
||||
Command="{Binding NavigateToCommand}"
|
||||
CommandParameter="{x:Static vm:NavItem.Planner}" />
|
||||
|
||||
<TextBlock Text="VERWALTUNG" FontSize="10" FontWeight="Bold"
|
||||
Opacity="0.4" Margin="8,16,0,4" />
|
||||
|
||||
<views:NavButton Icon="" Label="Arbeitszeit"
|
||||
Item="Workload"
|
||||
ActiveItem="{Binding ActiveNavItem}"
|
||||
Command="{Binding NavigateToCommand}"
|
||||
CommandParameter="{x:Static vm:NavItem.Workload}" />
|
||||
|
||||
<views:NavButton Icon="" Label="Einstellungen"
|
||||
Item="Settings"
|
||||
ActiveItem="{Binding ActiveNavItem}"
|
||||
Command="{Binding NavigateToCommand}"
|
||||
CommandParameter="{x:Static vm:NavItem.Settings}" />
|
||||
</StackPanel>
|
||||
|
||||
</DockPanel>
|
||||
</Border>
|
||||
|
||||
<!-- ── Hauptinhalt ───────────────────────────────────────────────────── -->
|
||||
<ContentControl Grid.Column="1"
|
||||
Content="{Binding CurrentPage}">
|
||||
<ContentControl.DataTemplates>
|
||||
<DataTemplate DataType="vm:DashboardViewModel">
|
||||
<views:DashboardView />
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type vm:PlaceholderViewModel}">
|
||||
<views:PlaceholderView />
|
||||
</DataTemplate>
|
||||
</ContentControl.DataTemplates>
|
||||
</ContentControl>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user