终端一体化运控平台
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

UserKeyBoard.xaml 16 KiB

2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
2 lat temu
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  1. <UserControl
  2. x:Class="BPASmartClient.CustomResource.UserControls.UserKeyBoard"
  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:BPASmartClient.CustomResource.UserControls"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. x:Name="Keyboard"
  9. d:DesignHeight="180"
  10. d:DesignWidth="500"
  11. Background="Transparent"
  12. mc:Ignorable="d">
  13. <UserControl.Resources>
  14. <Style x:Key="btnNum" TargetType="{x:Type Button}">
  15. <Setter Property="Cursor" Value="Hand" />
  16. <Setter Property="HorizontalContentAlignment" Value="Center" />
  17. <Setter Property="VerticalContentAlignment" Value="Center" />
  18. <Setter Property="Template">
  19. <Setter.Value>
  20. <ControlTemplate TargetType="{x:Type Button}">
  21. <Border
  22. x:Name="border"
  23. BorderBrush="#FF474747"
  24. BorderThickness="1"
  25. CornerRadius="6">
  26. <Border.Background>
  27. <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
  28. <GradientStop Color="#002A5F" />
  29. <GradientStop Offset="1" Color="#6495ED" />
  30. </LinearGradientBrush>
  31. </Border.Background>
  32. <ContentPresenter
  33. HorizontalAlignment="Center"
  34. VerticalAlignment="Center"
  35. TextElement.FontSize="16"
  36. TextElement.Foreground="#4fade8" />
  37. </Border>
  38. <ControlTemplate.Triggers>
  39. <Trigger Property="IsPressed" Value="True">
  40. <Setter TargetName="border" Property="Background">
  41. <Setter.Value>
  42. <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
  43. <GradientStop Color="#FFFF7500" />
  44. <GradientStop Offset="1" Color="#FFFFC547" />
  45. </LinearGradientBrush>
  46. </Setter.Value>
  47. </Setter>
  48. </Trigger>
  49. <Trigger Property="IsPressed" Value="False">
  50. <Setter TargetName="border" Property="Background">
  51. <Setter.Value>
  52. <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
  53. <GradientStop Color="#002A5F" />
  54. <GradientStop Offset="1" Color="#6495ED" />
  55. </LinearGradientBrush>
  56. </Setter.Value>
  57. </Setter>
  58. </Trigger>
  59. </ControlTemplate.Triggers>
  60. </ControlTemplate>
  61. </Setter.Value>
  62. </Setter>
  63. </Style>
  64. <Style x:Key="btnFunc" TargetType="{x:Type Button}">
  65. <Setter Property="Cursor" Value="Hand" />
  66. <Setter Property="HorizontalContentAlignment" Value="Center" />
  67. <Setter Property="VerticalContentAlignment" Value="Center" />
  68. <!--<Setter Property="Padding" Value="1"/>-->
  69. <Setter Property="Template">
  70. <Setter.Value>
  71. <ControlTemplate TargetType="{x:Type Button}">
  72. <Border
  73. x:Name="border"
  74. BorderBrush="#FF565656"
  75. BorderThickness="1"
  76. CornerRadius="6">
  77. <Border.Background>
  78. <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
  79. <GradientStop Color="#002A5F" />
  80. <GradientStop Offset="1" Color="#6495ED" />
  81. </LinearGradientBrush>
  82. </Border.Background>
  83. <ContentPresenter
  84. HorizontalAlignment="Center"
  85. VerticalAlignment="Center"
  86. TextElement.FontSize="18"
  87. TextElement.Foreground="White" />
  88. </Border>
  89. <ControlTemplate.Triggers>
  90. <Trigger Property="IsPressed" Value="True">
  91. <Setter TargetName="border" Property="Background">
  92. <Setter.Value>
  93. <LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
  94. <GradientStop Offset="1" Color="Gray" />
  95. <GradientStop Offset="0" Color="#FF2D2D2D" />
  96. </LinearGradientBrush>
  97. </Setter.Value>
  98. </Setter>
  99. </Trigger>
  100. </ControlTemplate.Triggers>
  101. </ControlTemplate>
  102. </Setter.Value>
  103. </Setter>
  104. </Style>
  105. </UserControl.Resources>
  106. <UserControl.Triggers>
  107. <EventTrigger RoutedEvent="UserControl.Loaded" SourceName="Keyboard">
  108. <BeginStoryboard>
  109. <Storyboard>
  110. <DoubleAnimation
  111. Storyboard.TargetName="Keyboard"
  112. Storyboard.TargetProperty="Opacity"
  113. From="0"
  114. To="1"
  115. Duration="0:0:0.2" />
  116. </Storyboard>
  117. </BeginStoryboard>
  118. </EventTrigger>
  119. </UserControl.Triggers>
  120. <Grid>
  121. <Grid.RowDefinitions>
  122. <RowDefinition Height="*" />
  123. </Grid.RowDefinitions>
  124. <Grid>
  125. <Grid.RowDefinitions>
  126. <RowDefinition Height="*" />
  127. </Grid.RowDefinitions>
  128. <Grid.ColumnDefinitions>
  129. <ColumnDefinition Width="10" />
  130. <ColumnDefinition Width="*" />
  131. <ColumnDefinition Width="10" />
  132. </Grid.ColumnDefinitions>
  133. <Grid
  134. x:Name="ButtonGrid"
  135. Grid.Row="1"
  136. Grid.Column="1"
  137. ButtonBase.Click="ButtonGrid_Click">
  138. <Grid.RowDefinitions>
  139. <RowDefinition Height="80*" />
  140. <RowDefinition Height="80*" />
  141. <RowDefinition Height="80*" />
  142. <RowDefinition Height="80*" />
  143. </Grid.RowDefinitions>
  144. <Grid.ColumnDefinitions>
  145. <ColumnDefinition Width="120*" />
  146. <ColumnDefinition Width="120*" />
  147. <ColumnDefinition Width="120*" />
  148. <ColumnDefinition Width="120*" />
  149. <ColumnDefinition Width="120*" />
  150. <ColumnDefinition Width="120*" />
  151. <ColumnDefinition Width="120*" />
  152. <ColumnDefinition Width="120*" />
  153. <ColumnDefinition Width="120*" />
  154. <ColumnDefinition Width="120*" />
  155. </Grid.ColumnDefinitions>
  156. <Button
  157. Grid.Row="0"
  158. Grid.Column="0"
  159. Margin="2"
  160. Content="1"
  161. Style="{StaticResource btnNum}" />
  162. <Button
  163. Grid.Row="0"
  164. Grid.Column="1"
  165. Margin="2"
  166. Content="2"
  167. Style="{StaticResource btnNum}" />
  168. <Button
  169. Grid.Row="0"
  170. Grid.Column="2"
  171. Margin="2"
  172. Content="3"
  173. Style="{StaticResource btnNum}" />
  174. <Button
  175. Grid.Row="0"
  176. Grid.Column="3"
  177. Margin="2"
  178. Content="4"
  179. Style="{StaticResource btnNum}" />
  180. <Button
  181. Grid.Row="0"
  182. Grid.Column="4"
  183. Margin="2"
  184. Content="5"
  185. Style="{StaticResource btnNum}" />
  186. <Button
  187. Grid.Row="0"
  188. Grid.Column="5"
  189. Margin="2"
  190. Content="6"
  191. Style="{StaticResource btnNum}" />
  192. <Button
  193. Grid.Row="0"
  194. Grid.Column="6"
  195. Margin="2"
  196. Content="7"
  197. Style="{StaticResource btnNum}" />
  198. <Button
  199. Grid.Row="0"
  200. Grid.Column="7"
  201. Margin="2"
  202. Content="8"
  203. Style="{StaticResource btnNum}" />
  204. <Button
  205. Grid.Row="0"
  206. Grid.Column="8"
  207. Margin="2"
  208. Content="9"
  209. Style="{StaticResource btnNum}" />
  210. <Button
  211. Grid.Row="0"
  212. Grid.Column="9"
  213. Margin="2"
  214. Content="0"
  215. Style="{StaticResource btnNum}" />
  216. <Button
  217. Grid.Row="1"
  218. Grid.Column="0"
  219. Margin="2"
  220. Content="Q"
  221. Style="{StaticResource btnNum}" />
  222. <Button
  223. Grid.Row="1"
  224. Grid.Column="1"
  225. Margin="2"
  226. Content="W"
  227. Style="{StaticResource btnNum}" />
  228. <Button
  229. Grid.Row="1"
  230. Grid.Column="2"
  231. Margin="2"
  232. Content="E"
  233. Style="{StaticResource btnNum}" />
  234. <Button
  235. Grid.Row="1"
  236. Grid.Column="3"
  237. Margin="2"
  238. Content="R"
  239. Style="{StaticResource btnNum}" />
  240. <Button
  241. Grid.Row="1"
  242. Grid.Column="4"
  243. Margin="2"
  244. Content="T"
  245. Style="{StaticResource btnNum}" />
  246. <Button
  247. Grid.Row="1"
  248. Grid.Column="5"
  249. Margin="2"
  250. Content="Y"
  251. Style="{StaticResource btnNum}" />
  252. <Button
  253. Grid.Row="1"
  254. Grid.Column="6"
  255. Margin="2"
  256. Content="U"
  257. Style="{StaticResource btnNum}" />
  258. <Button
  259. Grid.Row="1"
  260. Grid.Column="7"
  261. Margin="2"
  262. Content="I"
  263. Style="{StaticResource btnNum}" />
  264. <Button
  265. Grid.Row="1"
  266. Grid.Column="8"
  267. Margin="2"
  268. Content="O"
  269. Style="{StaticResource btnNum}" />
  270. <Button
  271. Grid.Row="1"
  272. Grid.Column="9"
  273. Margin="2"
  274. Content="P"
  275. Style="{StaticResource btnNum}" />
  276. <Button
  277. Grid.Row="2"
  278. Grid.Column="0"
  279. Margin="2"
  280. Content="A"
  281. Style="{StaticResource btnNum}" />
  282. <Button
  283. Grid.Row="2"
  284. Grid.Column="1"
  285. Margin="2"
  286. Content="S"
  287. Style="{StaticResource btnNum}" />
  288. <Button
  289. Grid.Row="2"
  290. Grid.Column="2"
  291. Margin="2"
  292. Content="D"
  293. Style="{StaticResource btnNum}" />
  294. <Button
  295. Grid.Row="2"
  296. Grid.Column="3"
  297. Margin="2"
  298. Content="F"
  299. Style="{StaticResource btnNum}" />
  300. <Button
  301. Grid.Row="2"
  302. Grid.Column="4"
  303. Margin="2"
  304. Content="G"
  305. Style="{StaticResource btnNum}" />
  306. <Button
  307. Grid.Row="2"
  308. Grid.Column="5"
  309. Margin="2"
  310. Content="H"
  311. Style="{StaticResource btnNum}" />
  312. <Button
  313. Grid.Row="2"
  314. Grid.Column="6"
  315. Margin="2"
  316. Content="J"
  317. Style="{StaticResource btnNum}" />
  318. <Button
  319. Grid.Row="2"
  320. Grid.Column="7"
  321. Margin="2"
  322. Content="K"
  323. Style="{StaticResource btnNum}" />
  324. <Button
  325. Grid.Row="2"
  326. Grid.Column="8"
  327. Margin="2"
  328. Content="L"
  329. Style="{StaticResource btnNum}" />
  330. <Button
  331. Grid.Row="3"
  332. Grid.Column="0"
  333. Margin="2"
  334. Content="Z"
  335. Style="{StaticResource btnNum}" />
  336. <Button
  337. Grid.Row="3"
  338. Grid.Column="1"
  339. Margin="2"
  340. Content="X"
  341. Style="{StaticResource btnNum}" />
  342. <Button
  343. Grid.Row="3"
  344. Grid.Column="2"
  345. Margin="2"
  346. Content="C"
  347. Style="{StaticResource btnNum}" />
  348. <Button
  349. Grid.Row="3"
  350. Grid.Column="3"
  351. Margin="2"
  352. Content="V"
  353. Style="{StaticResource btnNum}" />
  354. <Button
  355. Grid.Row="3"
  356. Grid.Column="4"
  357. Margin="2"
  358. Content="B"
  359. Style="{StaticResource btnNum}" />
  360. <Button
  361. Grid.Row="3"
  362. Grid.Column="5"
  363. Margin="2"
  364. Content="N"
  365. Style="{StaticResource btnNum}" />
  366. <Button
  367. Grid.Row="3"
  368. Grid.Column="6"
  369. Margin="2"
  370. Content="M"
  371. Style="{StaticResource btnNum}" />
  372. <Button
  373. Grid.Row="2"
  374. Grid.Column="9"
  375. Margin="2"
  376. Content="A/a"
  377. Style="{StaticResource btnFunc}" />
  378. <Button
  379. Grid.Row="3"
  380. Grid.Column="7"
  381. Margin="2"
  382. Content="DEL"
  383. Style="{StaticResource btnFunc}" />
  384. <Button
  385. Grid.Row="3"
  386. Grid.Column="8"
  387. Margin="2"
  388. Content="AC"
  389. Style="{StaticResource btnFunc}" />
  390. <Button
  391. Grid.Row="3"
  392. Grid.Column="9"
  393. Margin="2"
  394. Content="确认"
  395. Style="{StaticResource btnFunc}" />
  396. </Grid>
  397. </Grid>
  398. </Grid>
  399. </UserControl>