Skip to content
Snippets Groups Projects
Commit f596b194 authored by FabriceRonny.Bosshard's avatar FabriceRonny.Bosshard
Browse files

marks module styling improved

parent 56510ad4
No related branches found
No related tags found
1 merge request!64Resolve "Solution Code Improvement"
......@@ -6,4 +6,6 @@ namespace StudiApp.Models;
public partial class Mark
{
[Ignore] public string PercentageString => PercentageConverter.ConvertToString(Percentage);
[Ignore] public bool IsMarkPassed => Value >= 4.0;
}
......@@ -9,9 +9,9 @@
<SwipeView.RightItems>
<SwipeItems>
<SwipeItem Text="Delete"
BackgroundColor="Red"
Command="{Binding Source={RelativeSource AncestorType={x:Type viewmodel:MarksOverviewViewModel}}, Path=DeleteMarkCommand}"
CommandParameter="{Binding}"/>
BackgroundColor="Red"
Command="{Binding Source={RelativeSource AncestorType={x:Type viewmodel:MarksOverviewViewModel}}, Path=DeleteMarkCommand}"
CommandParameter="{Binding}"/>
</SwipeItems>
</SwipeView.RightItems>
<Frame Padding="10">
......@@ -22,10 +22,20 @@
<HorizontalStackLayout>
<Grid>
<Ellipse Fill="Black"
WidthRequest="40"
HeightRequest="40"
HorizontalOptions="Start" />
<Ellipse WidthRequest="40"
HeightRequest="40"
HorizontalOptions="Start" >
<Ellipse.Style>
<Style TargetType="Ellipse">
<Setter Property="Fill" Value="Green" />
<Style.Triggers>
<DataTrigger TargetType="Ellipse" Binding="{Binding IsMarkPassed}" Value="False">
<Setter Property="Fill" Value="OrangeRed" />
</DataTrigger>
</Style.Triggers>
</Style>
</Ellipse.Style>
</Ellipse>
<Label Text="{ Binding Value }"
TextColor="White"
FontSize="14"
......@@ -34,7 +44,7 @@
</Grid>
<VerticalStackLayout Margin="10,0">
<Label>
<Label FontAttributes="Bold">
<Label.Text>
<MultiBinding StringFormat="{}{0} - {1}">
<Binding Path="Course.Name"></Binding>
......
......@@ -30,7 +30,8 @@
</Grid.ColumnDefinitions>
<Label Text="Total Overview"
FontSize="20"
VerticalOptions="End"/>
FontAttributes="Bold"
VerticalOptions="Center"/>
<inputLayout:SfTextInputLayout Grid.Column="1" Grid.Row="0"
Margin="20, 0, 0, -20"
ContainerBackground="White"
......@@ -39,6 +40,7 @@
Hint="Semester">
<control:SfComboBox ItemsSource="{Binding Semesters}"
DisplayMemberPath="Name"
HeightRequest="15"
SelectedItem="{Binding SelectedSemester, Mode=TwoWay}">
</control:SfComboBox>
</inputLayout:SfTextInputLayout>
......@@ -47,7 +49,7 @@
<Frame Padding="10">
<HorizontalStackLayout>
<Grid>
<Ellipse Fill="Black"
<Ellipse Fill="Purple"
WidthRequest="40"
HeightRequest="40"
HorizontalOptions="Start" />
......@@ -57,7 +59,9 @@
HorizontalOptions="Center"
VerticalOptions="CenterAndExpand" />
</Grid>
<Label Text="Total ECTS"
<Label Text="Total ECTS"
FontAttributes="Bold"
FontSize="16"
VerticalOptions="Center"
Margin="10,0"/>
</HorizontalStackLayout>
......@@ -65,7 +69,7 @@
<Frame Padding="10">
<HorizontalStackLayout>
<Grid>
<Ellipse Fill="Black"
<Ellipse Fill="Purple"
WidthRequest="40"
HeightRequest="40"
HorizontalOptions="Start"/>
......@@ -76,6 +80,8 @@
VerticalOptions="CenterAndExpand" />
</Grid>
<Label Text="Average Mark"
FontAttributes="Bold"
FontSize="16"
VerticalOptions="Center"
Margin="10,0"/>
</HorizontalStackLayout>
......@@ -83,6 +89,7 @@
<Label Text="Semester Overview"
FontSize="20"
FontAttributes="Bold"
VerticalOptions="Center"/>
<Frame IsVisible="{Binding SelectedSemester, Converter={StaticResource IsNullConverter}}">
......@@ -93,7 +100,7 @@
<Frame Padding="10">
<HorizontalStackLayout>
<Grid>
<Ellipse Fill="Black"
<Ellipse Fill="Purple"
WidthRequest="40"
HeightRequest="40"
HorizontalOptions="Start" />
......@@ -103,7 +110,9 @@
HorizontalOptions="Center"
VerticalOptions="CenterAndExpand" />
</Grid>
<Label Text="Obtained ECTS"
<Label Text="Obtained ECTS"
FontAttributes="Bold"
FontSize="16"
VerticalOptions="Center"
Margin="10,0"/>
</HorizontalStackLayout>
......@@ -111,7 +120,7 @@
<Frame Padding="10">
<HorizontalStackLayout>
<Grid>
<Ellipse Fill="Black"
<Ellipse Fill="Purple"
WidthRequest="40"
HeightRequest="40"
HorizontalOptions="Start"/>
......@@ -123,6 +132,8 @@
</Grid>
<Label Text="Average Mark"
VerticalOptions="Center"
FontAttributes="Bold"
FontSize="16"
Margin="10,0"/>
</HorizontalStackLayout>
</Frame>
......@@ -134,10 +145,12 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Label Text="Marks List"
VerticalOptions="End"
VerticalOptions="Center"
FontAttributes="Bold"
FontSize="20"/>
<Button Grid.Column="1"
Text="New Mark"
HeightRequest="40"
Command="{Binding NewMarkCommand}"/>
</Grid>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment