CI / build-and-test (push) Canceled after 0s
CalendarDatePicker.SelectedDate ist (WPF-Toolkit-Ursprung) DateTime?, nicht DateTimeOffset? wie beim eingebauten DatePicker - Avalonia bietet dafuer keine automatische Konvertierung. Ohne Converter blieb das Feld leer und ein Klick auf einen Kalendertag warf eine InvalidCastException. Betraf auch die schon bestehenden Bindings in WithdrawStudentDialog und CreateLetterDialog, nur bislang unbemerkt. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
44 lines
2.4 KiB
XML
44 lines
2.4 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"
|
|
xmlns:conv="clr-namespace:LehrerApp.Desktop.Converters"
|
|
x:Class="LehrerApp.Desktop.Views.Groups.WithdrawStudentDialog"
|
|
x:DataType="vm:WithdrawStudentDialogViewModel"
|
|
Title="Schüler austragen"
|
|
Width="440" Height="330"
|
|
CanResize="False" WindowStartupLocation="CenterOwner">
|
|
|
|
<Grid RowDefinitions="*,Auto" Margin="24">
|
|
<StackPanel Grid.Row="0" Spacing="14">
|
|
<TextBlock Text="Schüler aus Lerngruppe austragen" Classes="dialogtitle"/>
|
|
|
|
<Border Background="{DynamicResource SystemControlBackgroundAltHighBrush}"
|
|
CornerRadius="6" Padding="12">
|
|
<Grid ColumnDefinitions="Auto,12,*" RowDefinitions="Auto,Auto">
|
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="Schüler" Opacity="0.65"/>
|
|
<TextBlock Grid.Row="0" Grid.Column="2" Text="{Binding StudentName}" FontWeight="SemiBold"/>
|
|
<TextBlock Grid.Row="1" Grid.Column="0" Text="Lerngruppe" Opacity="0.65"/>
|
|
<TextBlock Grid.Row="1" Grid.Column="2" Text="{Binding GroupName}" FontWeight="SemiBold"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<StackPanel Spacing="5">
|
|
<TextBlock Text="Austrittsdatum" FontSize="12" Opacity="0.7"/>
|
|
<CalendarDatePicker SelectedDate="{Binding SelectedDate, Converter={x:Static conv:DateTimeOffsetToDateTimeConverter.Instance}}"
|
|
DisplayDateStart="{Binding EarliestDate, Converter={x:Static conv:DateTimeOffsetToDateTimeConverter.Instance}}"
|
|
HorizontalAlignment="Stretch"/>
|
|
<TextBlock Text="{Binding DateError}" Foreground="Red" FontSize="12"
|
|
IsVisible="{Binding DateError, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
|
</StackPanel>
|
|
|
|
<TextBlock Text="Die bisherige Gruppenzugehörigkeit und alle zugehörigen Leistungen bleiben erhalten."
|
|
FontSize="12" Opacity="0.65" TextWrapping="Wrap"/>
|
|
</StackPanel>
|
|
|
|
<Grid Grid.Row="1" ColumnDefinitions="*,8,*" Margin="0,18,0,0">
|
|
<Button Grid.Column="0" Content="Abbrechen" HorizontalAlignment="Stretch" Click="OnCancel"/>
|
|
<Button Grid.Column="2" Content="Austragen" HorizontalAlignment="Stretch" Click="OnSave"/>
|
|
</Grid>
|
|
</Grid>
|
|
</Window>
|