Initial
This commit is contained in:
63
LehrerApp.Desktop/Views/Students/StudentListView.axaml
Normal file
63
LehrerApp.Desktop/Views/Students/StudentListView.axaml
Normal file
@@ -0,0 +1,63 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="clr-namespace:LehrerApp.Desktop.ViewModels.Students"
|
||||
x:Class="LehrerApp.Desktop.Views.Students.StudentListView"
|
||||
x:DataType="vm:StudentListViewModel">
|
||||
|
||||
<Grid RowDefinitions="Auto,*">
|
||||
|
||||
<!-- ── Toolbar ─────────────────────────────────────────────────────── -->
|
||||
<Border Grid.Row="0" Padding="20,16"
|
||||
BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
|
||||
BorderThickness="0,0,0,1">
|
||||
<Grid ColumnDefinitions="*,Auto,Auto">
|
||||
<StackPanel Grid.Column="0">
|
||||
<TextBlock Text="Schüler" FontSize="22" FontWeight="SemiBold"/>
|
||||
<TextBlock FontSize="12" Opacity="0.5">
|
||||
<Run Text="{Binding Students.Count}"/>
|
||||
<Run Text="Schüler gesamt"/>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
|
||||
<CheckBox Grid.Column="1"
|
||||
Content="Inaktive anzeigen"
|
||||
IsChecked="{Binding ShowInactive}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="0,0,12,0"/>
|
||||
|
||||
<Button Grid.Column="2"
|
||||
Content="+ Neuer Schüler"
|
||||
Command="{Binding AddStudentCommand}"
|
||||
VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- ── Liste + Suche ───────────────────────────────────────────────── -->
|
||||
<DockPanel Grid.Row="1">
|
||||
<TextBox DockPanel.Dock="Top"
|
||||
Text="{Binding SearchText}"
|
||||
Watermark="Name suchen…"
|
||||
Margin="16,10,16,4"/>
|
||||
|
||||
<DataGrid ItemsSource="{Binding Students}"
|
||||
SelectedItem="{Binding SelectedStudent}"
|
||||
AutoGenerateColumns="False"
|
||||
IsReadOnly="True"
|
||||
GridLinesVisibility="Horizontal"
|
||||
CanUserReorderColumns="False"
|
||||
CanUserResizeColumns="True"
|
||||
Margin="16,4">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="Name"
|
||||
Binding="{Binding FullName}"
|
||||
Width="*"/>
|
||||
<DataGridTextColumn Header="Geburtsdatum"
|
||||
Binding="{Binding DateOfBirth}"
|
||||
Width="130"/>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</DockPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user