44 lines
1.8 KiB
XML
44 lines
1.8 KiB
XML
<Window xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="clr-namespace:LehrerApp.Desktop.ViewModels.Groups"
|
|
x:Class="LehrerApp.Desktop.Views.Groups.AddStudentToGroupDialog"
|
|
x:DataType="vm:AddStudentToGroupDialogViewModel"
|
|
Title="Schüler hinzufügen"
|
|
Width="420" Height="500"
|
|
CanResize="False" WindowStartupLocation="CenterOwner">
|
|
|
|
<Grid RowDefinitions="Auto,*,Auto" Margin="24">
|
|
|
|
<!-- Überschrift + Suche -->
|
|
<StackPanel Grid.Row="0" Spacing="12" Margin="0,0,0,12">
|
|
<TextBlock Text="Schüler zur Gruppe hinzufügen" FontSize="18" FontWeight="SemiBold"/>
|
|
<TextBox Text="{Binding SearchText}"
|
|
PlaceholderText="Schüler suchen …"
|
|
x:Name="SearchBox"/>
|
|
</StackPanel>
|
|
|
|
<!-- Schülerliste -->
|
|
<ListBox Grid.Row="1"
|
|
ItemsSource="{Binding AvailableStudents}"
|
|
SelectedItem="{Binding SelectedStudent}"
|
|
BorderThickness="1">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate x:DataType="vm:StudentPickerItem">
|
|
<TextBlock Text="{Binding FullName}" Padding="4,2"/>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
|
|
<!-- Validation + Buttons -->
|
|
<StackPanel Grid.Row="2" Spacing="12" Margin="0,16,0,0">
|
|
<TextBlock Text="{Binding ValidationMessage}" Foreground="Red" FontSize="12"
|
|
IsVisible="{Binding ValidationMessage, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
|
<Grid ColumnDefinitions="*,8,*">
|
|
<Button Grid.Column="0" Content="Abbrechen" HorizontalAlignment="Stretch" Click="OnCancel"/>
|
|
<Button Grid.Column="2" Content="Hinzufügen" HorizontalAlignment="Stretch" Click="OnSave"/>
|
|
</Grid>
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
</Window>
|