Layout and Push Fix
This commit is contained in:
+82
-88
@@ -8,96 +8,90 @@
|
||||
Title="Monat"
|
||||
BackgroundColor="{DynamicResource AppBackground}">
|
||||
|
||||
<ScrollView>
|
||||
<VerticalStackLayout Padding="16" Spacing="16">
|
||||
<Grid ColumnDefinitions="Auto,*,Auto"
|
||||
VerticalOptions="Center">
|
||||
<Button Text="←"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding PreviousMonthCommand}" />
|
||||
<Label Grid.Column="1"
|
||||
Text="{Binding HeaderText}"
|
||||
HorizontalTextAlignment="Center"
|
||||
VerticalTextAlignment="Center"
|
||||
FontSize="20"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
<Button Grid.Column="2"
|
||||
Text="→"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding NextMonthCommand}" />
|
||||
</Grid>
|
||||
<Grid RowDefinitions="Auto,Auto,Auto,*"
|
||||
Padding="16"
|
||||
RowSpacing="12">
|
||||
|
||||
<Grid ColumnDefinitions="*,*"
|
||||
ColumnSpacing="12">
|
||||
<Button Text="Heute"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding TodayCommand}" />
|
||||
<Button Grid.Column="1"
|
||||
Text="Export"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding ExportPdfCommand}" />
|
||||
</Grid>
|
||||
<Grid Grid.Row="0"
|
||||
ColumnDefinitions="Auto,*,Auto"
|
||||
ColumnSpacing="12">
|
||||
<Button Text="◀"
|
||||
Command="{Binding PreviousMonthCommand}"
|
||||
Style="{StaticResource SecondaryButtonStyle}" />
|
||||
|
||||
<Grid ColumnDefinitions="*,*,*,*,*,*,*"
|
||||
ColumnSpacing="4">
|
||||
<Label Text="Mo" HorizontalTextAlignment="Center" TextColor="{DynamicResource TextMuted}" />
|
||||
<Label Grid.Column="1" Text="Di" HorizontalTextAlignment="Center" TextColor="{DynamicResource TextMuted}" />
|
||||
<Label Grid.Column="2" Text="Mi" HorizontalTextAlignment="Center" TextColor="{DynamicResource TextMuted}" />
|
||||
<Label Grid.Column="3" Text="Do" HorizontalTextAlignment="Center" TextColor="{DynamicResource TextMuted}" />
|
||||
<Label Grid.Column="4" Text="Fr" HorizontalTextAlignment="Center" TextColor="{DynamicResource TextMuted}" />
|
||||
<Label Grid.Column="5" Text="Sa" HorizontalTextAlignment="Center" TextColor="{DynamicResource TextMuted}" />
|
||||
<Label Grid.Column="6" Text="So" HorizontalTextAlignment="Center" TextColor="{DynamicResource TextMuted}" />
|
||||
</Grid>
|
||||
<Label Grid.Column="1"
|
||||
Text="{Binding HeaderText}"
|
||||
HorizontalTextAlignment="Center"
|
||||
VerticalTextAlignment="Center"
|
||||
FontSize="22"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
|
||||
<CollectionView ItemsSource="{Binding Cells}"
|
||||
SelectionMode="None">
|
||||
<CollectionView.ItemsLayout>
|
||||
<GridItemsLayout Orientation="Vertical"
|
||||
Span="7" />
|
||||
</CollectionView.ItemsLayout>
|
||||
<CollectionView.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewModels:MonthCellViewModel">
|
||||
<Border Margin="2"
|
||||
Padding="6"
|
||||
Stroke="{Binding BorderColor}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}"
|
||||
StrokeShape="RoundRectangle 10">
|
||||
<Border.Triggers>
|
||||
<DataTrigger TargetType="Border"
|
||||
Binding="{Binding IsPlaceholder}"
|
||||
Value="True">
|
||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
||||
<Setter Property="StrokeThickness" Value="0" />
|
||||
</DataTrigger>
|
||||
</Border.Triggers>
|
||||
<Button Grid.Column="2"
|
||||
Text="▶"
|
||||
Command="{Binding NextMonthCommand}"
|
||||
Style="{StaticResource SecondaryButtonStyle}" />
|
||||
</Grid>
|
||||
|
||||
<Border.GestureRecognizers>
|
||||
<TapGestureRecognizer
|
||||
Command="{Binding Source={RelativeSource AncestorType={x:Type viewModels:MonthViewModel}}, Path=OpenDayCommand, x:DataType='viewModels:MonthViewModel'}"
|
||||
CommandParameter="{Binding .}" />
|
||||
</Border.GestureRecognizers>
|
||||
<Grid Grid.Row="1"
|
||||
ColumnDefinitions="*,*"
|
||||
ColumnSpacing="12">
|
||||
<Button Text="Heute"
|
||||
Command="{Binding TodayCommand}"
|
||||
Style="{StaticResource SecondaryButtonStyle}" />
|
||||
<Button Grid.Column="1"
|
||||
Text="Export"
|
||||
Command="{Binding ExportPdfCommand}"
|
||||
Style="{StaticResource PrimaryButtonStyle}" />
|
||||
</Grid>
|
||||
|
||||
<VerticalStackLayout Spacing="4">
|
||||
<Label Text="{Binding DayNumberText}"
|
||||
IsVisible="{Binding ShowDayNumber}"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{Binding TextColor}" />
|
||||
<Border Padding="4"
|
||||
IsVisible="{Binding ShowAverage}"
|
||||
StrokeThickness="0"
|
||||
StrokeShape="RoundRectangle 8"
|
||||
BackgroundColor="{Binding StateColor}">
|
||||
<Label Text="{Binding AverageStateText}"
|
||||
FontSize="11"
|
||||
HorizontalTextAlignment="Center"
|
||||
TextColor="White" />
|
||||
</Border>
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</CollectionView.ItemTemplate>
|
||||
</CollectionView>
|
||||
</VerticalStackLayout>
|
||||
</ScrollView>
|
||||
</ContentPage>
|
||||
<Grid Grid.Row="2"
|
||||
ColumnDefinitions="*,*,*,*,*,*,*"
|
||||
ColumnSpacing="6"
|
||||
Padding="2,0">
|
||||
<Label Text="Mo" HorizontalTextAlignment="Center" TextColor="{DynamicResource TextMuted}" />
|
||||
<Label Grid.Column="1" Text="Di" HorizontalTextAlignment="Center" TextColor="{DynamicResource TextMuted}" />
|
||||
<Label Grid.Column="2" Text="Mi" HorizontalTextAlignment="Center" TextColor="{DynamicResource TextMuted}" />
|
||||
<Label Grid.Column="3" Text="Do" HorizontalTextAlignment="Center" TextColor="{DynamicResource TextMuted}" />
|
||||
<Label Grid.Column="4" Text="Fr" HorizontalTextAlignment="Center" TextColor="{DynamicResource TextMuted}" />
|
||||
<Label Grid.Column="5" Text="Sa" HorizontalTextAlignment="Center" TextColor="{DynamicResource TextMuted}" />
|
||||
<Label Grid.Column="6" Text="So" HorizontalTextAlignment="Center" TextColor="{DynamicResource TextMuted}" />
|
||||
</Grid>
|
||||
|
||||
<CollectionView Grid.Row="3"
|
||||
ItemsSource="{Binding Cells}"
|
||||
SelectionMode="None">
|
||||
<CollectionView.ItemsLayout>
|
||||
<GridItemsLayout Orientation="Vertical"
|
||||
Span="7"
|
||||
VerticalItemSpacing="6"
|
||||
HorizontalItemSpacing="6" />
|
||||
</CollectionView.ItemsLayout>
|
||||
|
||||
<CollectionView.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewModels:MonthCellViewModel">
|
||||
<Border Stroke="{Binding BorderColor}"
|
||||
BackgroundColor="{Binding BackgroundColor}"
|
||||
StrokeShape="RoundRectangle 10"
|
||||
Padding="6"
|
||||
MinimumHeightRequest="58">
|
||||
<Border.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.OpenDayCommand}"
|
||||
CommandParameter="{Binding .}" />
|
||||
</Border.GestureRecognizers>
|
||||
|
||||
<Grid>
|
||||
<Label Text="{Binding DayNumberText}"
|
||||
IsVisible="{Binding ShowDayNumber}"
|
||||
HorizontalTextAlignment="Center"
|
||||
VerticalTextAlignment="Center"
|
||||
FontAttributes="Bold"
|
||||
FontSize="15"
|
||||
TextColor="{Binding TextColor}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</CollectionView.ItemTemplate>
|
||||
</CollectionView>
|
||||
</Grid>
|
||||
</ContentPage>
|
||||
Reference in New Issue
Block a user