AlarmView.xaml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <UserControl x:Class="MECF.Framework.UI.Client.CenterViews.Alarms.Alarm.AlarmView"
  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. mc:Ignorable="d"
  7. d:DesignHeight="325" d:DesignWidth="1200">
  8. <Grid>
  9. <Grid.ColumnDefinitions>
  10. <ColumnDefinition Width="7*" />
  11. <ColumnDefinition Width="5*" />
  12. </Grid.ColumnDefinitions>
  13. <GroupBox Header="Alarm List" Margin="5,0,12,5">
  14. <DataGrid AutoGenerateColumns="False" Margin="5" Name="eventList"
  15. Background="White" ItemsSource="{Binding AlarmEvents, Mode=OneWay}"
  16. SelectionMode="Single" SelectionUnit="FullRow"
  17. FontFamily="Arial,SimSun" FontSize="13"
  18. SelectionChanged="listView1_SelectionChanged" BorderThickness="0.1"
  19. CanUserDeleteRows="True" CanUserAddRows="True" IsReadOnly="True" RowHeight="25">
  20. <DataGrid.Columns>
  21. <DataGridTemplateColumn Header="Type" Width="90" CanUserSort="True" SortMemberPath="Type">
  22. <DataGridTemplateColumn.HeaderTemplate >
  23. <DataTemplate>
  24. <TextBlock Text="Type" />
  25. </DataTemplate>
  26. </DataGridTemplateColumn.HeaderTemplate>
  27. <DataGridTemplateColumn.CellTemplate>
  28. <DataTemplate>
  29. <Label Content="{Binding Type}" Background="{Binding TextColor}" FontSize="12"/>
  30. </DataTemplate>
  31. </DataGridTemplateColumn.CellTemplate>
  32. </DataGridTemplateColumn>
  33. <DataGridTextColumn Header="Time" Width="150" CanUserSort="True" IsReadOnly="True" Binding="{Binding OccuringTime,Mode=OneWay}">
  34. <DataGridTextColumn.HeaderTemplate >
  35. <DataTemplate>
  36. <TextBlock Text="Time" />
  37. </DataTemplate>
  38. </DataGridTextColumn.HeaderTemplate>
  39. </DataGridTextColumn>
  40. <DataGridTextColumn Header="Description" Width="*" CanUserSort="True" IsReadOnly="True" Binding="{Binding Description,Mode=OneWay}">
  41. <DataGridTextColumn.HeaderTemplate >
  42. <DataTemplate>
  43. <TextBlock Text="Description" />
  44. </DataTemplate>
  45. </DataGridTextColumn.HeaderTemplate>
  46. </DataGridTextColumn>
  47. </DataGrid.Columns>
  48. </DataGrid>
  49. </GroupBox>
  50. <GroupBox Grid.Column="1" Header="Detail" Margin="0,0,5,5">
  51. <TextBlock x:Name="AnalysisText" FontSize="14" Margin="5" Background="White" TextWrapping="Wrap" Style="{x:Null}"/>
  52. </GroupBox>
  53. </Grid>
  54. </UserControl>