100 lines
3.7 KiB
XML
100 lines
3.7 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<ContentPage
|
|
x:Class="cfs_tracker.Views.MonthPage"
|
|
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
x:Name="ThisPage"
|
|
Title="Monat">
|
|
|
|
<Grid RowDefinitions="Auto,Auto,*" Padding="16">
|
|
|
|
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto,Auto" Margin="0,0,0,12">
|
|
<Button
|
|
Grid.Column="0"
|
|
Text="◀"
|
|
WidthRequest="52"
|
|
HeightRequest="44"
|
|
Command="{Binding PreviousMonthCommand}" />
|
|
|
|
<Label
|
|
Grid.Column="1"
|
|
Text="{Binding SelectedMonthText}"
|
|
HorizontalTextAlignment="Center"
|
|
VerticalTextAlignment="Center"
|
|
FontSize="24"
|
|
FontAttributes="Bold" />
|
|
|
|
<Button
|
|
Grid.Column="2"
|
|
Text="Heute"
|
|
Margin="8,0,0,0"
|
|
Command="{Binding TodayCommand}" />
|
|
|
|
<Button
|
|
Grid.Column="3"
|
|
Text="▶"
|
|
WidthRequest="52"
|
|
HeightRequest="44"
|
|
Margin="8,0,0,0"
|
|
Command="{Binding NextMonthCommand}" />
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="1" ColumnDefinitions="*,*,*,*,*,*,*" Margin="0,0,0,8">
|
|
<Label Grid.Column="0" Text="Mo" HorizontalTextAlignment="Center" FontAttributes="Bold" />
|
|
<Label Grid.Column="1" Text="Di" HorizontalTextAlignment="Center" FontAttributes="Bold" />
|
|
<Label Grid.Column="2" Text="Mi" HorizontalTextAlignment="Center" FontAttributes="Bold" />
|
|
<Label Grid.Column="3" Text="Do" HorizontalTextAlignment="Center" FontAttributes="Bold" />
|
|
<Label Grid.Column="4" Text="Fr" HorizontalTextAlignment="Center" FontAttributes="Bold" />
|
|
<Label Grid.Column="5" Text="Sa" HorizontalTextAlignment="Center" FontAttributes="Bold" />
|
|
<Label Grid.Column="6" Text="So" HorizontalTextAlignment="Center" FontAttributes="Bold" />
|
|
</Grid>
|
|
|
|
<CollectionView
|
|
Grid.Row="2"
|
|
ItemsSource="{Binding Days}"
|
|
SelectionMode="None">
|
|
|
|
<CollectionView.ItemsLayout>
|
|
<GridItemsLayout Orientation="Vertical" Span="7" />
|
|
</CollectionView.ItemsLayout>
|
|
|
|
<CollectionView.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid Padding="3">
|
|
<Border
|
|
HeightRequest="74"
|
|
BackgroundColor="{Binding BackgroundColor}"
|
|
Stroke="{Binding BorderColor}"
|
|
StrokeThickness="1"
|
|
StrokeShape="RoundRectangle 10">
|
|
|
|
<Grid Padding="6">
|
|
<Grid.GestureRecognizers>
|
|
<TapGestureRecognizer
|
|
Command="{Binding Source={x:Reference ThisPage}, Path=BindingContext.OpenDayCommand}"
|
|
CommandParameter="{Binding .}" />
|
|
</Grid.GestureRecognizers>
|
|
|
|
<VerticalStackLayout
|
|
IsVisible="{Binding IsRealDay}"
|
|
Spacing="4">
|
|
<Label
|
|
Text="{Binding DayNumberText}"
|
|
TextColor="{Binding TextColor}"
|
|
FontAttributes="Bold"
|
|
FontSize="16" />
|
|
|
|
<Label
|
|
Text="{Binding CountText}"
|
|
TextColor="{Binding TextColor}"
|
|
FontSize="12" />
|
|
</VerticalStackLayout>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</CollectionView.ItemTemplate>
|
|
</CollectionView>
|
|
|
|
</Grid>
|
|
</ContentPage> |