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

пре 2 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <UserControl x:Class="FryPot_DosingSystem.View.LogView"
  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:FryPot_DosingSystem.View"
  7. xmlns:vm="clr-namespace:FryPot_DosingSystem.ViewModel"
  8. mc:Ignorable="d"
  9. d:DesignHeight="450" d:DesignWidth="800">
  10. <UserControl.Resources>
  11. <ResourceDictionary>
  12. <ResourceDictionary.MergedDictionaries>
  13. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml"/>
  14. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml"/>
  15. </ResourceDictionary.MergedDictionaries>
  16. </ResourceDictionary>
  17. </UserControl.Resources>
  18. <Grid>
  19. <Grid.RowDefinitions>
  20. <RowDefinition Height="50"/>
  21. <RowDefinition/>
  22. </Grid.RowDefinitions>
  23. <DataGrid Grid.Row="1" ItemsSource="{Binding LogDatas}">
  24. <DataGrid.Columns>
  25. <DataGridTemplateColumn Header="日志时间" Width="300">
  26. <DataGridTemplateColumn.CellTemplate>
  27. <DataTemplate>
  28. <TextBlock Text="{Binding LogTime, UpdateSourceTrigger=PropertyChanged}" Foreground="{Binding ForeColor, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Center" FontSize="14"></TextBlock>
  29. </DataTemplate>
  30. </DataGridTemplateColumn.CellTemplate>
  31. </DataGridTemplateColumn>
  32. <DataGridTemplateColumn Header="日志类型" Width="300">
  33. <DataGridTemplateColumn.CellTemplate>
  34. <DataTemplate>
  35. <TextBlock Text="{Binding LogType, UpdateSourceTrigger=PropertyChanged}" Foreground="{Binding ForeColor, UpdateSourceTrigger=PropertyChanged}" FontSize="14" HorizontalAlignment="Center">
  36. </TextBlock>
  37. </DataTemplate>
  38. </DataGridTemplateColumn.CellTemplate>
  39. </DataGridTemplateColumn>
  40. <DataGridTemplateColumn Header="日志信息" Width="*">
  41. <DataGridTemplateColumn.CellTemplate>
  42. <DataTemplate>
  43. <TextBlock Text="{Binding LogMessage, UpdateSourceTrigger=PropertyChanged}"
  44. Foreground="{Binding ForeColor, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Center" FontSize="14"></TextBlock>
  45. </DataTemplate>
  46. </DataGridTemplateColumn.CellTemplate>
  47. </DataGridTemplateColumn>
  48. </DataGrid.Columns>
  49. </DataGrid>
  50. </Grid>
  51. </UserControl>