<UserControl x:Class="HistoryView.Controls.WarningItem"
             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" 
             xmlns:local="clr-namespace:HistoryView.Controls"
             xmlns:converter="clr-namespace:HistoryView.Converters"
             mc:Ignorable="d" 
             x:Name="This"
             d:DesignHeight="450" d:DesignWidth="800">
    <UserControl.Resources>
        <converter:DateTimeToString x:Key="DateTimeConverter"/>
    </UserControl.Resources>
    <Grid Margin="0,4">
        <Grid >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="22"/>
                <ColumnDefinition Width="8"/>
                <ColumnDefinition Width="80"/>
                <ColumnDefinition Width="4"/>
                <ColumnDefinition Width="60"/>
                <ColumnDefinition Width="8"/>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="8"/>
                <ColumnDefinition Width="120"/>
                <ColumnDefinition Width="8"/>
                <ColumnDefinition Width="*"/>
  
            </Grid.ColumnDefinitions>
            <Image Grid.Column="0" Source="{StaticResource Icon_Warning}"/>

            <TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding ElementName=This, Path=Alarm.EventTime ,Converter={StaticResource DateTimeConverter}, ConverterParameter=Date}"/>
            <TextBlock Grid.Column="4" VerticalAlignment="Center" Text="{Binding ElementName=This, Path=Alarm.EventTime ,Converter={StaticResource DateTimeConverter}, ConverterParameter=Time}"/>
            <TextBlock Grid.Column="6" VerticalAlignment="Center" Text="{Binding ElementName=This, Path=Alarm.AlarmMini8}"/>
            <TextBlock Grid.Column="8" VerticalAlignment="Center" Text="{Binding ElementName=This, Path=Alarm.AlarmChannel}"/>
            <!--<TextBlock Grid.Column="10" VerticalAlignment="Center" Text="{Binding ElementName=This, Path=Alarm.ChannelName}"/>-->
            <TextBlock Grid.Column="10" VerticalAlignment="Center" Text="{Binding ElementName=This, Path=Alarm.AlarmDetail}"/>
        </Grid>
    </Grid>
</UserControl>
