Bei neuem Eintrag die vorhandenen anzeigen.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:models="clr-namespace:Jugenddienst_Stunden.ViewModels"
|
||||
x:Class="Jugenddienst_Stunden.Views.StundePage"
|
||||
Title="Eintrag bearbeiten">
|
||||
Title="{Binding Title}">
|
||||
|
||||
<ContentPage.BindingContext>
|
||||
<models:StundeViewModel />
|
||||
@@ -45,5 +45,46 @@
|
||||
<Button Text="Speichern" Command="{Binding SaveCommand}" />
|
||||
<Button Grid.Column="1" Text="Löschen" Command="{Binding DeleteConfirmCommand}" />
|
||||
</Grid>
|
||||
|
||||
<BoxView HeightRequest="1" Color="Red" Margin="5,10"/>
|
||||
|
||||
<CollectionView
|
||||
ItemsSource="{Binding DayTimes}"
|
||||
x:Name="stundeItems" Margin="0"
|
||||
HeightRequest="350"
|
||||
SelectionMode="Single"
|
||||
SelectionChangedCommand="{Binding SelectEntryCommand}"
|
||||
SelectionChangedCommandParameter="{Binding Source={RelativeSource Self}, Path=SelectedItem}">
|
||||
|
||||
<CollectionView.ItemsLayout>
|
||||
<LinearItemsLayout Orientation="Vertical" ItemSpacing="0" />
|
||||
</CollectionView.ItemsLayout>
|
||||
|
||||
<CollectionView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Padding="5,10,5,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<HorizontalStackLayout Grid.Row="0" Grid.Column="0">
|
||||
<Label Grid.Column="0" Text="{Binding begin}"/>
|
||||
<Label Text="bis" Padding="5,0,5,0"/>
|
||||
<Label Text="{Binding end}"/>
|
||||
<Label Text="{Binding GemeindeAktiv.Name}" Margin="10,0,0,0"/>
|
||||
<Label Text="{Binding ProjektAktiv.Name}" Margin="10,0,0,0"/>
|
||||
<Label Text="{Binding FreistellungAktiv.Name}" Margin="10,0,0,0"/>
|
||||
</HorizontalStackLayout>
|
||||
|
||||
<Label Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Text="{Binding description}" Padding="0,0,0,15"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</CollectionView.ItemTemplate>
|
||||
|
||||
</CollectionView>
|
||||
</VerticalStackLayout>
|
||||
</ContentPage>
|
||||
@@ -5,7 +5,6 @@ namespace Jugenddienst_Stunden.Views;
|
||||
|
||||
public partial class StundePage : ContentPage {
|
||||
|
||||
public ICommand DeleteConfirmCommand { get; }
|
||||
|
||||
public StundePage() {
|
||||
InitializeComponent();
|
||||
|
||||
Reference in New Issue
Block a user