<UserControl
    x:Class="Client.View.DepartmentsView"
    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:local="clr-namespace:Client.View"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    d:DesignHeight="550"
    d:DesignWidth="800"
    mc:Ignorable="d">

    <Grid>
        <Rectangle
            Grid.Row="0"
            Grid.Column="0"
            Height="50"
            Margin="0,0,0,0"
            HorizontalAlignment="Stretch"
            VerticalAlignment="Top">
            <Rectangle.Fill>
                <LinearGradientBrush MappingMode="RelativeToBoundingBox" StartPoint="0.5,0" EndPoint="0.5,1">
                    <GradientStop Color="#FF065393" />
                    <GradientStop Offset="1" Color="#FF1D507A" />
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <Label
            Grid.Row="2"
            Grid.Column="1"
            Margin="30,5,0,0"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            HorizontalContentAlignment="Center"
            VerticalContentAlignment="Center"
            Content="EVIDENCE ODDĚLENÍ"
            FontSize="24"
            FontWeight="Bold"
            Foreground="White" />

        <Button Command="{Binding ShowAddNewDepartmentCommand}" Style="{StaticResource AddNewButton}">
            <Image
                Width="30"
                Height="30"
                RenderOptions.BitmapScalingMode="Fant"
                Source="/Client;component/Img/plus.png" />
        </Button>

        <Button
            Command="{Binding DeleteDepartmentCommand}"
            CommandParameter="{Binding Departments/}"
            Style="{StaticResource DeleteButton}">
            <Image
                Width="30"
                Height="30"
                RenderOptions.BitmapScalingMode="Fant"
                Source="/Client;component/Img/delete.png" />
        </Button>

        <Button Style="{StaticResource FilterButton}">
            <Image
                Width="30"
                Height="30"
                RenderOptions.BitmapScalingMode="Fant"
                Source="/Client;component/Img/filter.png" />
        </Button>

        <Rectangle
            Grid.Row="2"
            Grid.Column="1"
            Grid.ColumnSpan="3"
            MinHeight="300"
            Margin="0,50,0,00"
            HorizontalAlignment="Stretch"
            VerticalAlignment="Stretch"
            Fill="#FFD6DFE1">
            <Rectangle.BitmapEffect>
                <DropShadowBitmapEffect
                    Direction="-90"
                    ShadowDepth="3"
                    Softness="0.1"
                    Color="#FF1D507A" />
            </Rectangle.BitmapEffect>
        </Rectangle>

        <Border
            Grid.Row="2"
            Grid.Column="1"
            Grid.ColumnSpan="3"
            MinHeight="260"
            Margin="30,70,30,30"
            HorizontalAlignment="Stretch"
            VerticalAlignment="Stretch"
            BorderBrush="#77869b"
            BorderThickness="1"
            CornerRadius="10">
            <DataGrid
                x:Name="EmployeesDataGrid"
                Grid.Row="2"
                Grid.Column="1"
                Grid.ColumnSpan="3"
                MinHeight="260"
                Margin="0,5,0,5"
                Padding="0,0,0,0"
                HorizontalAlignment="Stretch"
                VerticalAlignment="Stretch"
                AutoGenerateColumns="False"
                Background="#FFD6DFE1"
                BorderBrush="Transparent"
                HorizontalGridLinesBrush="#77869b"
                IsReadOnly="True"
                IsSynchronizedWithCurrentItem="True"
                ItemsSource="{Binding Departments}"
                RowHeaderWidth="0"
                RowHeight="30"
                TextBlock.TextAlignment="Center"
                VerticalGridLinesBrush="#FFD6DFE1">

                <DataGrid.InputBindings>
                    <MouseBinding
                        Command="{Binding ShowDepartmentDetailCommand}"
                        CommandParameter="{Binding Departments/}"
                        MouseAction="LeftDoubleClick" />
                </DataGrid.InputBindings>

                <DataGrid.Columns>
                    <DataGridTextColumn
                        Width="*"
                        Binding="{Binding Id}"
                        Header="ID" />
                    <DataGridTextColumn
                        Width="*"
                        Binding="{Binding Name}"
                        Header="NÁZEV" />
                </DataGrid.Columns>

                <DataGrid.Resources>
                    <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#FF3D70D1" />
                    <SolidColorBrush x:Key="{x:Static SystemColors.HighlightTextBrushKey}" Color="White" />
                    <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="#FF3D70D1" />
                    <SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightTextBrushKey}" Color="White" />
                </DataGrid.Resources>

            </DataGrid>
        </Border>
    </Grid>

</UserControl>
