-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStudentCoursePage.xaml
More file actions
149 lines (133 loc) · 6.48 KB
/
StudentCoursePage.xaml
File metadata and controls
149 lines (133 loc) · 6.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
x:Class="MyMauiApp.StudentCoursePage"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
BackgroundColor="White"
Shell.NavBarIsVisible="False">
<!-- Вся страница делится на 2 ряда:
0 – чёрный хедер,
1 – контент курса с фоном -->
<Grid RowDefinitions="Auto,*"
RowSpacing="0">
<!-- ЧЁРНЫЙ ХЕДЕР СРАЗУ ОТ ВЕРХА -->
<Grid Grid.Row="0"
BackgroundColor="Black"
Padding="24,32,24,16">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!-- Кнопка «назад» -->
<ImageButton
Source="back_icon.png"
WidthRequest="20"
HeightRequest="20"
BackgroundColor="Transparent"
Clicked="OnBackTapped" />
<!-- Заголовок -->
<Label Grid.Column="1"
HorizontalOptions="Center"
VerticalOptions="Center"
Text="Panel wybranego kursu"
TextColor="White"
FontSize="16"
FontAttributes="Bold" />
<!-- Иконка профиля -->
<Image Grid.Column="2"
Source="user_icon.png"
WidthRequest="22"
HeightRequest="22"
HorizontalOptions="End"
VerticalOptions="Center" />
</Grid>
<!-- КОНТЕНТ КУРСА -->
<Grid Grid.Row="1">
<!-- Фоновые волны -->
<Image Source="bg_waves.png"
Aspect="AspectFill" />
<ScrollView>
<VerticalStackLayout
Padding="24,16,24,32"
Spacing="16">
<!-- Карточка курса + прогресс -->
<Frame CornerRadius="26"
Padding="16,12"
BackgroundColor="White"
BorderColor="Black"
HasShadow="False">
<Grid ColumnDefinitions="*,Auto">
<VerticalStackLayout Spacing="2">
<!-- НАЗВАНИЕ КУРСА -->
<Label x:Name="CourseTitleLabel"
Text="Nazwa kursu"
FontSize="14"
FontAttributes="Bold"
TextColor="Black" />
<!-- ИНФО О ЛЕКЦИЯХ -->
<Label x:Name="LessonsInfoLabel"
Text="Wykład X z Y"
FontSize="12"
TextColor="#555555" />
</VerticalStackLayout>
<!-- Процент завершения -->
<Frame Grid.Column="1"
WidthRequest="60"
HeightRequest="60"
CornerRadius="30"
BorderColor="Black"
BackgroundColor="White"
HasShadow="False"
HorizontalOptions="End"
VerticalOptions="Center">
<Label x:Name="ProgressPercentLabel"
Text="0%"
HorizontalOptions="Center"
VerticalOptions="Center"
FontSize="14"
FontAttributes="Bold"
TextColor="Black" />
</Frame>
</Grid>
</Frame>
<!-- СПИСОК МАТЕРИАЛОВ КУРСА -->
<CollectionView
ItemsSource="{Binding Materials}"
SelectionMode="None">
<CollectionView.ItemTemplate>
<DataTemplate>
<Frame CornerRadius="26"
Padding="16,12"
BackgroundColor="White"
BorderColor="Black"
HasShadow="False"
Margin="0,4,0,4">
<Frame.GestureRecognizers>
<TapGestureRecognizer
Tapped="OnMaterialTapped"
CommandParameter="{Binding .}" />
</Frame.GestureRecognizers>
<Grid ColumnDefinitions="*,Auto">
<!-- Название материала -->
<Label Text="{Binding Title}"
FontSize="14"
TextColor="Black"
VerticalOptions="Center" />
<!-- Иконка "play" справа -->
<Image Grid.Column="1"
Source="play_icon.png"
WidthRequest="16"
HeightRequest="16"
HorizontalOptions="End"
VerticalOptions="Center" />
</Grid>
</Frame>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</VerticalStackLayout>
</ScrollView>
</Grid>
</Grid>
</ContentPage>