-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.xaml
222 lines (213 loc) · 15.4 KB
/
index.xaml
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Bilibili_Client"
xmlns:System="clr-namespace:System;assembly=mscorlib"
x:Class="Bilibili_Client.index"
mc:Ignorable="d"
Background="Transparent"
Title="index"
xmlns:hc="https://handyorg.github.io/handycontrol">
<Page.CommandBindings>
<CommandBinding Command="New"
Executed="Goto_Video_Page"></CommandBinding>
</Page.CommandBindings>
<!--Height="792"
Width="1034"-->
<hc:TransitioningContentControl TransitionMode="Bottom2Top">
<Grid>
<hc:ScrollViewer IsInertiaEnabled="True"
x:Name="index_scrollViewer"
ScrollChanged="ScrollChanged">
<hc:TransitioningContentControl TransitionMode="Left2Right">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<hc:TransitioningContentControl TransitionMode="Left2Right">
<Grid Grid.Row="0"
x:Name="Index_Grid">
</Grid>
</hc:TransitioningContentControl>
<hc:CoverView PreviewMouseWheel="content_box_PreviewMouseWheel"
Grid.Row="1"
x:Name="content_box"
ItemHeight="284"
ItemWidth="304"
Margin="20,0,20,0"
ItemContentHeight="100">
<hc:CoverView.ItemHeaderTemplate>
<DataTemplate>
<Grid Width="304"
Height="284">
<Grid.RowDefinitions>
<RowDefinition Height="190"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<!--(视频封面|视频)&&时长-->
<Grid Grid.Row="0">
<Border Background="White"
BorderBrush="#FFD1D1D1"
BorderThickness="0"
CornerRadius="10,10,0,0">
<Button Uid="{Binding Avid}"
Height="190"
BorderThickness="0"
Background="Transparent"
hc:BorderElement.CornerRadius="10"
Command="New"
CommandParameter="{Binding RelativeSource={RelativeSource Mode=Self}}">
<Image Name="cover_img"
Width="285"
Height="178"
Source="{Binding video_cover}"
HorizontalAlignment="Right"
VerticalAlignment="Top">
<Image.Clip>
<RectangleGeometry RadiusX="10"
RadiusY="10"
Rect="0,0,285,178
" />
</Image.Clip>
</Image>
</Button>
</Border>
<!--视频时长-->
<Border CornerRadius="5"
Background="#FF403D3D"
HorizontalAlignment="Right"
Margin="0,158,15,10">
<TextBlock Width="auto"
Text="{Binding video_duration}"
FontSize="10"
Foreground="White"
VerticalAlignment="Center"
Padding="10,0" />
</Border>
</Grid>
<!--标题&信息栏-->
<Grid Grid.Row="1">
<Border BorderBrush="#FFD1D1D1"
BorderThickness="0"
CornerRadius="0,0,10,10"
Background="White">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<!--标题栏-->
<Grid Grid.Row="0">
<TextBlock TextTrimming="CharacterEllipsis"
FontSize="16"
Text="{Binding video_title}"
VerticalAlignment="Center"
FontFamily="Microsoft YaHei"
FontWeight="Bold"
HorizontalAlignment="Left"
Margin="8,0,0,0" />
</Grid>
<!--信息栏-->
<Grid Grid.Row="1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!--播放量模块-->
<Grid Grid.Column="0">
<!--播放量LOGO-->
<Image Source="resource/img/播放量.png"
Height="20"
RenderTransformOrigin="0.4,0.589"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Margin="8,0,0,0"
Width="20" />
<!--播放量-->
<TextBlock FontFamily="Microsoft YaHei"
Foreground="Gray"
Text="{Binding video_play_volume}"
Margin="27,0,0,0"
HorizontalAlignment="Left"
FontSize="10"
FontWeight="Bold"
VerticalAlignment="Center" />
</Grid>
<!--弹幕数模块-->
<Grid Grid.Column="1">
<!--弹幕数LOGO-->
<Image Source="resource/img/弹幕数.png"
Height="16"
RenderTransformOrigin="0.4,0.589"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Margin="6,0,0,0"
Width="16" />
<!--弹幕数-->
<TextBlock FontSize="10"
FontFamily="Microsoft YaHei"
Foreground="Gray"
Text="{Binding video_barrages}"
Margin="22,0,0,0"
Width="76"
FontWeight="Bold"
VerticalAlignment="Center" />
</Grid>
<Grid Grid.Column="2">
<!--分区-->
<TextBlock FontFamily="Microsoft YaHei"
Foreground="Gray"
Text="{Binding video_partition}"
HorizontalAlignment="Left"
FontWeight="Bold"
VerticalAlignment="Center" />
</Grid>
</Grid>
</Grid>
<!--up信息模块-->
<Grid Grid.Row="2">
<!--UP LOGO-->
<Image Source="{Binding head_img_url}"
Height="22"
RenderTransformOrigin="0.4,0.589"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Width="22"
Margin="7,0,0,0">
<Image.Clip>
<RectangleGeometry RadiusX="100"
RadiusY="100"
Rect="0,0,22,22" />
</Image.Clip>
</Image>
<!--UP名字&发布时间-->
<TextBlock FontFamily="Microsoft YaHei"
Foreground="Gray"
Text="{Binding video_up}"
Margin="33,0,0,0"
HorizontalAlignment="Left"
FontWeight="Bold"
VerticalAlignment="Center" />
</Grid>
</Grid>
</Border>
</Grid>
</Grid>
</DataTemplate>
</hc:CoverView.ItemHeaderTemplate>
<hc:CoverView.ItemTemplate>
<DataTemplate>
</DataTemplate>
</hc:CoverView.ItemTemplate>
</hc:CoverView>
</Grid>
</hc:TransitioningContentControl>
</hc:ScrollViewer>
</Grid>
</hc:TransitioningContentControl>
</Page>