星火微课系统客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

VideoClipWindow.xaml 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. <Window
  2. x:Class="XHWK.WKTool.VideoClipWindow"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:XHWK.WKTool"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. Title="VideoClipWindow"
  9. Width="1290"
  10. Height="1036"
  11. AllowsTransparency="True"
  12. BorderThickness="7"
  13. ResizeMode="CanMinimize"
  14. ShowInTaskbar="True"
  15. WindowStartupLocation="CenterScreen"
  16. WindowStyle="None"
  17. mc:Ignorable="d">
  18. <Window.Effect>
  19. <DropShadowEffect
  20. BlurRadius="10"
  21. Direction="80"
  22. ShadowDepth="0"
  23. Color="#bababa" />
  24. </Window.Effect>
  25. <Window.Resources />
  26. <Grid Name="MainGrid">
  27. <Grid.RowDefinitions>
  28. <RowDefinition Height="50*" />
  29. <RowDefinition Height="750*" />
  30. <RowDefinition Height="auto" />
  31. <RowDefinition Height="147*" />
  32. </Grid.RowDefinitions>
  33. <Grid
  34. Grid.Row="0"
  35. Background="#4597FF"
  36. MouseLeftButtonDown="Title_MouseLeftButtonDown">
  37. <TextBlock
  38. Padding="10,13,0,0"
  39. FontSize="16"
  40. Foreground="#FFFFFF"
  41. Text="视频剪辑" />
  42. <Button
  43. x:Name="BtnDown"
  44. Grid.Row="0"
  45. Padding="10,0,10,0"
  46. HorizontalAlignment="Right"
  47. Click="Button_Click"
  48. Content="×"
  49. Cursor="Hand"
  50. FontSize="25"
  51. Foreground="#FFFFFF" />
  52. </Grid>
  53. <Grid
  54. x:Name="GridMovie"
  55. Grid.Row="1"
  56. Background="Black">
  57. <MediaElement
  58. Name="QsMovie"
  59. Grid.ColumnSpan="2"
  60. HorizontalAlignment="Stretch"
  61. VerticalAlignment="Stretch"
  62. Loaded="QS_Movie_Loaded"
  63. LoadedBehavior="Manual"
  64. MediaOpened="Element_MediaOpened"
  65. Stretch="Fill"
  66. Volume="1" />
  67. <!--<Button Name="LeftButton" Width="50" Height="50" HorizontalAlignment="Left" VerticalAlignment="Center" Click="Left_Click" Visibility="Hidden" Margin="0,147">上一个</Button>
  68. <Button Name="RightButton" Width="50" Height="50" HorizontalAlignment="Right" VerticalAlignment="Center" Click="Right_Click" Visibility="Hidden" Grid.Column="1" Margin="0,147">下一个</Button>-->
  69. </Grid>
  70. <!--<StackPanel Grid.Row="2" Orientation="Horizontal">-->
  71. <Grid Grid.Row="2">
  72. <Grid.ColumnDefinitions>
  73. <ColumnDefinition Width="50*" />
  74. <ColumnDefinition Width="1796*" />
  75. <ColumnDefinition Width="60*" />
  76. </Grid.ColumnDefinitions>
  77. <Grid Grid.Column="0">
  78. <Button
  79. x:Name="Play"
  80. Margin="0"
  81. HorizontalAlignment="Stretch"
  82. VerticalAlignment="Stretch"
  83. Click="Play_Click"
  84. Cursor="Hand">
  85. <StackPanel Orientation="Vertical">
  86. <Image
  87. x:Name="ImgPlay"
  88. Source="/Images/Clip_Play.png"
  89. Visibility="Visible" />
  90. <Image
  91. x:Name="ImgPause"
  92. Source="/Images/Clip_Pause.png"
  93. Visibility="Collapsed" />
  94. </StackPanel>
  95. </Button>
  96. </Grid>
  97. <!--<Grid Grid.Row="0" Grid.Column="1">
  98. <Slider x:Name="timelineSlider" Minimum="0" VerticalAlignment="Center" PreviewMouseLeftButtonDown="timelineMDown" PreviewMouseLeftButtonUp="timelineMUp" BorderThickness="0,5,0,0" />
  99. </Grid>
  100. <Grid Grid.Row="1" Grid.Column="1">
  101. <local:UC_MultiRangeSlider x:Name="UcSlider" Minimum="0" Maximum="1000" SilderWidth="1807" SliderTickFrequency="1" Grid.RowSpan="2" PreviewMouseLeftButtonDown="UcSlider_PreviewMouseLeftButtonDown" PreviewMouseLeftButtonUp="UcSlider_PreviewMouseLeftButtonUp" PreviewMouseMove="UcSlider_PreviewMouseMove"/>
  102. </Grid>-->
  103. <Grid
  104. Name="ControlProgress"
  105. Grid.Column="1"
  106. Height="54">
  107. <local:UC_MultiRangeSlider
  108. x:Name="UcSlider"
  109. Margin="0,18,5,0"
  110. VerticalAlignment="Top"
  111. Maximum="1000"
  112. Minimum="0"
  113. PreviewMouseLeftButtonDown="UcSlider_PreviewMouseLeftButtonDown"
  114. PreviewMouseLeftButtonUp="UcSlider_PreviewMouseLeftButtonUp"
  115. PreviewMouseMove="UcSlider_PreviewMouseMove"
  116. SilderWidth="1807"
  117. SliderTickFrequency="1" />
  118. <Slider
  119. x:Name="TimelineSlider"
  120. Margin="12,5,7,0"
  121. VerticalAlignment="Top"
  122. BorderThickness="0,5,0,0"
  123. Minimum="0"
  124. PreviewMouseLeftButtonDown="TimelineMDown"
  125. PreviewMouseLeftButtonUp="TimelineMUp" />
  126. </Grid>
  127. </Grid>
  128. <!--</StackPanel>-->
  129. <Grid
  130. Name="MovieControl"
  131. Grid.Row="3"
  132. Margin="0">
  133. <Grid.RowDefinitions>
  134. <RowDefinition Height="53*" />
  135. <RowDefinition Height="100*" />
  136. </Grid.RowDefinitions>
  137. <Grid.ColumnDefinitions>
  138. <ColumnDefinition Width="5*" />
  139. <ColumnDefinition Width="90*" />
  140. <ColumnDefinition Width="1086*" />
  141. <ColumnDefinition Width="90*" />
  142. <ColumnDefinition Width="5*" />
  143. </Grid.ColumnDefinitions>
  144. <Grid Grid.Row="0" Grid.Column="1">
  145. <Label
  146. x:Name="LblProgress"
  147. VerticalAlignment="Center"
  148. Content="00:00:00"
  149. FontSize="{Binding WordSize18}" />
  150. </Grid>
  151. <Grid Grid.Row="0" Grid.Column="2">
  152. <StackPanel
  153. Margin="0"
  154. HorizontalAlignment="Center"
  155. VerticalAlignment="Center"
  156. Orientation="Horizontal">
  157. <Label
  158. Margin="10,0,0,0"
  159. HorizontalAlignment="Left"
  160. VerticalAlignment="Center"
  161. Content="开始时间:"
  162. FontSize="{Binding WordSize18}" />
  163. <TextBox
  164. x:Name="TxbStartTime"
  165. Width="130"
  166. Margin="5,0,0,0"
  167. HorizontalAlignment="Left"
  168. VerticalAlignment="Center"
  169. FontSize="{Binding WordSize18}"
  170. LostFocus="TxbStartTime_LostFocus"
  171. Text="00:00:00.000" />
  172. <Label
  173. Margin="20,0,0,0"
  174. HorizontalAlignment="Center"
  175. VerticalAlignment="Center"
  176. Content="结束时间:"
  177. FontSize="{Binding WordSize18}" />
  178. <TextBox
  179. x:Name="TxbEndTime"
  180. Width="130"
  181. Margin="5,0,0,0"
  182. HorizontalAlignment="Center"
  183. VerticalAlignment="Center"
  184. FontSize="{Binding WordSize18}"
  185. LostFocus="TxbEndTime_LostFocus"
  186. Text="00:00:00.000" />
  187. <Label
  188. Margin="20,0,0,0"
  189. HorizontalAlignment="Right"
  190. VerticalAlignment="Center"
  191. Content="视频时长:"
  192. FontSize="{Binding WordSize18}" />
  193. <Label
  194. x:Name="LblVideoTime"
  195. Margin="5,0,10,0"
  196. HorizontalAlignment="Right"
  197. VerticalAlignment="Center"
  198. Content="00:00:00.000"
  199. FontSize="{Binding WordSize18}" />
  200. </StackPanel>
  201. </Grid>
  202. <Grid Grid.Row="0" Grid.Column="3">
  203. <Grid.ColumnDefinitions>
  204. <ColumnDefinition Width="30*" />
  205. <ColumnDefinition Width="120*" />
  206. </Grid.ColumnDefinitions>
  207. <Grid.RowDefinitions>
  208. <RowDefinition Height="27*" />
  209. <RowDefinition Height="27*" />
  210. </Grid.RowDefinitions>
  211. <Image
  212. Name="Horn"
  213. Grid.Row="1"
  214. Grid.Column="0"
  215. Margin="0"
  216. Source="/Images/Clip_Volunme.png" />
  217. <Slider
  218. Name="Volunme"
  219. Grid.Row="1"
  220. Grid.Column="1"
  221. Margin="0"
  222. VerticalAlignment="Center"
  223. Maximum="1"
  224. Minimum="0"
  225. Value="{Binding ElementName=QsMovie, Path=Volume, Mode=TwoWay}" />
  226. </Grid>
  227. <Grid Grid.Row="1" Grid.Column="2">
  228. <Button
  229. x:Name="BtnClip"
  230. HorizontalAlignment="Center"
  231. VerticalAlignment="Center"
  232. Click="BtnClip_Click"
  233. Content=" 剪 辑 "
  234. Cursor="Hand"
  235. FontSize="{Binding WordSize20}"
  236. Foreground="White">
  237. <Button.Template>
  238. <ControlTemplate TargetType="{x:Type Button}">
  239. <Border
  240. Padding="10,5"
  241. BorderBrush="{TemplateBinding Control.BorderBrush}"
  242. BorderThickness="1"
  243. CornerRadius="8">
  244. <Border.Background>#4597FF</Border.Background>
  245. <ContentPresenter
  246. HorizontalAlignment="Center"
  247. VerticalAlignment="Center"
  248. Content="{TemplateBinding ContentControl.Content}" />
  249. </Border>
  250. </ControlTemplate>
  251. </Button.Template>
  252. </Button>
  253. </Grid>
  254. </Grid>
  255. </Grid>
  256. </Window>