44 lines
2.2 KiB
XML
44 lines
2.2 KiB
XML
<Window xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="clr-namespace:LehrerApp.Desktop.ViewModels.Planning"
|
|
x:Class="LehrerApp.Desktop.Views.Planning.TimetableUnitPickerDialog"
|
|
x:DataType="vm:TimetableUnitPickerViewModel"
|
|
Title="Einheit für die Stunde wählen"
|
|
Width="470" Height="390" MinWidth="420" MinHeight="360"
|
|
CanResize="False" WindowStartupLocation="CenterOwner">
|
|
<Grid RowDefinitions="*,Auto" Margin="24">
|
|
<StackPanel Grid.Row="0" Spacing="16">
|
|
<TextBlock Text="Stunde anlegen" Classes="dialogtitle"/>
|
|
<TextBlock Text="{Binding ContextLabel}" FontSize="12" Opacity="0.65"/>
|
|
<TextBlock Text="Die Stunde braucht eine Unterrichtseinheit. Laufende Einheiten werden zuerst vorgeschlagen."
|
|
FontSize="12" TextWrapping="Wrap" Opacity="0.75"/>
|
|
|
|
<StackPanel Spacing="5" IsVisible="{Binding HasUnits}">
|
|
<TextBlock Text="Vorhandene Einheit" FontSize="12" Opacity="0.7"/>
|
|
<ComboBox ItemsSource="{Binding Units}" SelectedItem="{Binding SelectedUnit}"
|
|
HorizontalAlignment="Stretch">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate x:DataType="vm:TimetableUnitOption">
|
|
<StackPanel>
|
|
<TextBlock Text="{Binding Label}" FontWeight="SemiBold"/>
|
|
<TextBlock Text="{Binding Detail}" FontSize="11" Opacity="0.6"/>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
</StackPanel>
|
|
|
|
<StackPanel Spacing="5">
|
|
<TextBlock Text="Oder neue Einheit anlegen" FontSize="12" Opacity="0.7"/>
|
|
<TextBox Text="{Binding NewUnitTitle}" PlaceholderText="Titel der neuen Einheit"/>
|
|
</StackPanel>
|
|
<TextBlock Text="{Binding Error}" Foreground="Red" FontSize="11"
|
|
IsVisible="{Binding Error, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
|
</StackPanel>
|
|
<Grid Grid.Row="1" ColumnDefinitions="*,8,*" Margin="0,20,0,0">
|
|
<Button Grid.Column="0" Content="Abbrechen" HorizontalAlignment="Stretch" Click="OnCancel"/>
|
|
<Button Grid.Column="2" Content="Weiter zur Planung" HorizontalAlignment="Stretch" Click="OnSave"/>
|
|
</Grid>
|
|
</Grid>
|
|
</Window>
|