<Window x:Class="VSview.StatusWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:VSview"
        xmlns:cont ="clr-namespace:CustomControls"
        mc:Ignorable="d"
        Title="Detector status" Height="500" Width="800" WindowStartupLocation="Manual" ResizeMode="NoResize" MinWidth="800" MinHeight="500" WindowStyle="None">

    <Window.Resources>

        <ResourceDictionary>

            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/VSview;component/View/Resources/Styles/Styles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>

    <Grid Margin="0,0,0,0" Background="#FF4D5664">

        <Button x:Name="RollDown_btn"  VerticalAlignment="Top" Panel.ZIndex="1" Height="45" Command="{Binding Command[CloseStatusWindow]}" HorizontalAlignment="Right" Width="44" Margin="0,2,12,0">
            <Button.Template>
                <ControlTemplate TargetType="Button">
                    <Grid RenderTransformOrigin="0.5,0.5" x:Name="RootGrid">
                        <Border  CornerRadius="7">
                            <Border.Background>
                                <ImageBrush ImageSource="Resources/Images/arrow.png" />
                            </Border.Background>
                        </Border>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property ="IsPressed"  Value ="True">
                            <Setter TargetName ="RootGrid"  Property="RenderTransform">
                                <Setter.Value>
                                    <ScaleTransform ScaleX="0.95" ScaleY="0.95"/>
                                </Setter.Value>
                            </Setter>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Button.Template>
        </Button>

        <TabControl  x:Name="MainScreenTab" Background="DarkGray">

            <TabItem  x:Name="ERRORS" Header="{DynamicResource LabelStatusHeader}"  Margin="-3,2,-36,-1">

                    <DataGrid x:Name="ErrorList_dt" HeadersVisibility="Column" CanUserAddRows="False" Margin="0,0,160,0" CanUserReorderColumns="False" Background="White" CanUserResizeRows="True" ItemsSource="{Binding ActiveStatus}"  AutoGenerateColumns="False"
                          VerticalContentAlignment="Center"   HorizontalContentAlignment="Left"  >
                        <DataGrid.Resources>
                            <Style TargetType="{x:Type DataGridCell}">
                                <Style.Triggers>
                                    <Trigger Property="IsSelected" Value="True">
                                        <Setter Property="Background" Value="Azure" />
                                        <Setter Property="Foreground" Value="Black"/>
                                    </Trigger>
                                </Style.Triggers>
                            </Style>
                        </DataGrid.Resources>
                        <DataGrid.Columns>
                            <DataGridTextColumn Header="{DynamicResource LabelStatusDate}" ElementStyle="{StaticResource DataCellStyleCenter}" IsReadOnly="True" Binding="{Binding Date}" MinWidth="60" CanUserResize="False" />
                            <DataGridTextColumn Header="{DynamicResource LabelStatusTime}" ElementStyle="{StaticResource DataCellStyleCenter}" IsReadOnly="True" Binding="{Binding Time}" MinWidth="60" CanUserResize="false"/>
                            <DataGridTextColumn Header="{DynamicResource LabelStatusName}" ElementStyle="{StaticResource DataCellStyleLeft}" IsReadOnly="True" MinWidth="100" Binding="{Binding Name}" CanUserResize="true"  />
                            <DataGridTextColumn Header="{DynamicResource LabelStatusDescription}" ElementStyle="{StaticResource DataCellStyleLeft}" IsReadOnly="True" Binding="{Binding Description}" CanUserResize="true"  />
                        </DataGrid.Columns>
                        <DataGrid.ColumnHeaderStyle>
                            <Style TargetType="{x:Type DataGridColumnHeader}">
                                <Setter Property="Padding" Value="5"/>
                                <Setter Property="Background" Value="White" />
                                <Setter Property="BorderBrush" Value="Black" />
                                <Setter Property="BorderThickness" Value="1" />
                            </Style>
                        </DataGrid.ColumnHeaderStyle>
                    </DataGrid>

                

            </TabItem>


        </TabControl>
        <cont:PushButton Command="{Binding Command[OpenManual]}" Text="{DynamicResource  ButtonStatusOpenManual}" FontSize="20" FontWeight="Medium" HorizontalAlignment="Right" Panel.ZIndex="1" VerticalAlignment="Bottom" Width="130" Height="60" Margin="0,0,20,10"/>
        <cont:LabeledCheckbox x:Name="Errors" Height="50" Margin="0,66,10,0" Text="{DynamicResource LabelStatusOnlyErrors}" IsChecked="{Binding ErrorsChecked}" HorizontalAlignment="Right" Width="148" VerticalAlignment="Top"            />

        <cont:PushButton Command="{Binding Command[Acknowledge]}" Text="{DynamicResource ButtonStatusAcknowledge}" FontSize="20" FontWeight="Medium" HorizontalAlignment="Right" Panel.ZIndex="1" VerticalAlignment="Bottom" Width="130" Height="60" Margin="0,0,20,85"/>


    </Grid>
</Window>
