<UserControl x:Class="Aitex.Core.UI.View.Common.MonitorView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
            d:DesignHeight="325" d:DesignWidth="1200">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="7*" />
            <ColumnDefinition Width="5*" />
        </Grid.ColumnDefinitions>
        <GroupBox Header="{DynamicResource GlobalLableMonitorViewEventList}" Margin="5,0,12,5">
            <DataGrid AutoGenerateColumns="False" Margin="5" Name="eventList" 
                      Background="White" ItemsSource="{Binding AlarmEvents, Mode=OneWay}" 
                      SelectionMode="Single" SelectionUnit="FullRow"
                      FontFamily="Arial,SimSun" FontSize="13"                     
                        SelectionChanged="listView1_SelectionChanged" BorderThickness="0.1" 
                          CanUserDeleteRows="True" CanUserAddRows="True" IsReadOnly="True" RowHeight="25">
                <DataGrid.Columns>
                    <DataGridTemplateColumn Header="Type" Width="90" CanUserSort="True" SortMemberPath="Type">
                        <DataGridTemplateColumn.HeaderTemplate >
                            <DataTemplate>
                                <TextBlock Text="{DynamicResource GlobalLableMonitorViewType}" />
                            </DataTemplate>
                        </DataGridTemplateColumn.HeaderTemplate>
                        <DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <Label Content="{Binding Type}" Background="{Binding TextColor}" FontSize="12"/>
                            </DataTemplate>
                        </DataGridTemplateColumn.CellTemplate>
                    </DataGridTemplateColumn>

                    <DataGridTextColumn Header="Time" Width="80" CanUserSort="True" IsReadOnly="True" Binding="{Binding OccuringTime,Mode=OneWay}">
                        <DataGridTextColumn.HeaderTemplate >
                            <DataTemplate>
                                <TextBlock Text="{DynamicResource GlobalLableMonitorViewTime}" />
                            </DataTemplate>
                        </DataGridTextColumn.HeaderTemplate>
                    </DataGridTextColumn>
                    <DataGridTextColumn Header="Description" Width="*" CanUserSort="True" IsReadOnly="True" Binding="{Binding Description,Mode=OneWay}">
                        <DataGridTextColumn.HeaderTemplate >
                            <DataTemplate>
                                <TextBlock Text="{DynamicResource GlobalLableMonitorViewDescription}" />
                            </DataTemplate>
                        </DataGridTextColumn.HeaderTemplate>
                    </DataGridTextColumn>
                </DataGrid.Columns>
            </DataGrid>
        </GroupBox>
        <GroupBox Grid.Column="1" Header="{DynamicResource GlobalLableMonitorViewDetail}" Margin="0,0,5,5">
            <TextBlock x:Name="AnalysisText" FontSize="14" Margin="5" Background="White" TextWrapping="Wrap" Style="{x:Null}"/>
        </GroupBox>
    </Grid>
</UserControl>
