Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

80 řádky
3.5 KiB

  1. <hc:Window
  2. x:Class="HKCardOUT.Views.RootView"
  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:hc="https://handyorg.github.io/handycontrol"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:viewModels="clr-namespace:HKCardOUT.ViewModels"
  9. Title="海科智慧一卡通平台"
  10. d:DataContext="{d:DesignInstance Type=viewModels:RootViewModel}"
  11. ShowMaxButton="False"
  12. ShowMinButton="False"
  13. ShowTitle="True"
  14. WindowStartupLocation="CenterScreen"
  15. WindowState="Maximized"
  16. mc:Ignorable="d">
  17. <hc:Window.Resources>
  18. <Style x:Key="SaleLogHeader" TargetType="DataGridColumnHeader">
  19. <Setter Property="FontSize" Value="18" />
  20. <Setter Property="Background" Value="Transparent" />
  21. <Setter Property="Foreground" Value="White" />
  22. <Setter Property="HorizontalAlignment" Value="Center" />
  23. <Setter Property="VerticalAlignment" Value="Center" />
  24. </Style>
  25. <Style x:Key="CenterAlignmentStyle" TargetType="TextBlock">
  26. <Setter Property="TextAlignment" Value="Center" />
  27. <Setter Property="VerticalAlignment" Value="Center" />
  28. <Setter Property="Foreground" Value="White" />
  29. <Setter Property="FontSize" Value="15" />
  30. <Setter Property="Background" Value="Transparent" />
  31. </Style>
  32. </hc:Window.Resources>
  33. <hc:Window.Background>
  34. <ImageBrush ImageSource="/HKResouces/背景.jpg" />
  35. </hc:Window.Background>
  36. <DataGrid
  37. AutoGenerateColumns="False"
  38. Background="Transparent"
  39. IsReadOnly="True"
  40. ItemsSource="{Binding Result}"
  41. Style="{StaticResource DataGridBaseStyle}">
  42. <DataGrid.RowStyle>
  43. <Style BasedOn="{StaticResource DataGridRowStyle}" TargetType="DataGridRow">
  44. <Setter Property="Background" Value="Transparent" />
  45. <Style.Triggers>
  46. <Trigger Property="UIElement.IsMouseOver" Value="true">
  47. <Setter Property="Background" Value="Transparent" />
  48. </Trigger>
  49. </Style.Triggers>
  50. </Style>
  51. </DataGrid.RowStyle>
  52. <DataGrid.Columns>
  53. <DataGridTextColumn
  54. Width="230"
  55. Binding="{Binding CardNo}"
  56. ElementStyle="{StaticResource CenterAlignmentStyle}"
  57. Header="卡号"
  58. HeaderStyle="{StaticResource SaleLogHeader}" />
  59. <DataGridTextColumn
  60. Width="230"
  61. Binding="{Binding Money}"
  62. ElementStyle="{StaticResource CenterAlignmentStyle}"
  63. Header="金额"
  64. HeaderStyle="{StaticResource SaleLogHeader}" />
  65. <DataGridTextColumn
  66. Width="230"
  67. Binding="{Binding Location}"
  68. ElementStyle="{StaticResource CenterAlignmentStyle}"
  69. Header="档口"
  70. HeaderStyle="{StaticResource SaleLogHeader}" />
  71. <DataGridTextColumn
  72. Width="230"
  73. Binding="{Binding CreateTime, StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}"
  74. ElementStyle="{StaticResource CenterAlignmentStyle}"
  75. Header="消费时间"
  76. HeaderStyle="{StaticResource SaleLogHeader}" />
  77. </DataGrid.Columns>
  78. </DataGrid>
  79. </hc:Window>