<UserControl x:Class="FLY.Thick.FilmCasting.UI.Server.UcAllErrNos"
      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:FLY.Thick.FilmCasting.UI.Server"
      mc:Ignorable="d" 
      d:DesignHeight="450" d:DesignWidth="800">
    <UserControl.Resources>
        <Style x:Key="greyDataGridRowStyle" TargetType="DataGridRow">
            <Style.Triggers>
                <DataTrigger Binding="{Binding IsError}" Value="True">
                    <Setter Property="Background" Value="LightPink" />
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </UserControl.Resources>

    <Grid>

        <DataGrid ItemsSource="{Binding ErrNos}" AutoGenerateColumns="False" IsReadOnly="True" Margin="{StaticResource ControlMargin}"
                      AlternationCount ="2"
                      RowHeaderWidth="0"
                    RowStyle="{StaticResource greyDataGridRowStyle}">

            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding ErrCode}" Header="{StaticResource str.PgAllErrNos.ErrCode}"/>
                <DataGridTextColumn Binding="{Binding Description}" Header="{StaticResource str.PgAllErrNos.Description}"/>
            </DataGrid.Columns>

        </DataGrid>
    </Grid>
</UserControl>
