终端一体化运控平台
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.
 
 
 

57 line
3.5 KiB

  1. <UserControl x:Class="BPASmartClient.MilkWithTea.View.MessageLogInfo"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:BPASmartClient.MilkWithTea.View"
  7. mc:Ignorable="d"
  8. d:DesignHeight="800" d:DesignWidth="1400" Background="Transparent">
  9. <UserControl.Resources>
  10. <Style TargetType="DataGridRow">
  11. <Setter Property="Background" Value="#F3F6F9 "/>
  12. </Style>
  13. </UserControl.Resources>
  14. <Grid Margin="20">
  15. <Grid.RowDefinitions>
  16. <RowDefinition Height="60"/>
  17. <RowDefinition Height="*"/>
  18. </Grid.RowDefinitions>
  19. <Grid Grid.Row="1">
  20. <Border Background="White" BorderBrush="#D5DFE5 " BorderThickness="12" CornerRadius="5">
  21. <DataGrid Margin="20" ItemsSource="{Binding LogDataGrid, UpdateSourceTrigger=PropertyChanged}" Grid.Row="2"
  22. AutoGenerateColumns="False"
  23. FrozenColumnCount="1"
  24. VerticalAlignment="Top"
  25. IsReadOnly="True"
  26. CanUserResizeColumns="False" CanUserResizeRows="False" SelectionMode="Single"
  27. CanUserReorderColumns="False" AlternationCount="2" RowHeaderWidth="0" CanUserAddRows="False">
  28. <DataGrid.Columns>
  29. <DataGridTemplateColumn Header="日志时间" Width="300">
  30. <DataGridTemplateColumn.CellTemplate>
  31. <DataTemplate>
  32. <TextBlock HorizontalAlignment="Center" Text="{Binding time, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="14" Foreground="{Binding foreground, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
  33. </DataTemplate>
  34. </DataGridTemplateColumn.CellTemplate>
  35. </DataGridTemplateColumn>
  36. <DataGridTemplateColumn Header="日志类型" Width="200">
  37. <DataGridTemplateColumn.CellTemplate>
  38. <DataTemplate>
  39. <TextBlock HorizontalAlignment="Center" Text="{Binding type, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="14" Foreground="{Binding foreground, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
  40. </DataTemplate>
  41. </DataGridTemplateColumn.CellTemplate>
  42. </DataGridTemplateColumn>
  43. <DataGridTemplateColumn Header="日志内容" Width="*">
  44. <DataGridTemplateColumn.CellTemplate>
  45. <DataTemplate>
  46. <TextBlock HorizontalAlignment="Left" Text="{Binding message, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="14" Foreground="{Binding foreground, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
  47. </DataTemplate>
  48. </DataGridTemplateColumn.CellTemplate>
  49. </DataGridTemplateColumn>
  50. </DataGrid.Columns>
  51. </DataGrid>
  52. </Border>
  53. </Grid>
  54. </Grid>
  55. </UserControl>