<UserControl x:Class="WpfApp1.Views.DictionariesView"
             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:WpfApp1.Views"
             mc:Ignorable="d" 
             d:DesignHeight="650" d:DesignWidth="1100">
    <Grid Background="#F5F7FA">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <TextBlock Grid.Row="0"
                   Text="Справочники"
                   FontSize="26"
                   FontWeight="Bold"
                   Foreground="#263238"
                   Margin="25 25 25 10"/>

        <TextBlock Grid.Row="1"
                   Text="В этом разделе отображаются детали, технологические параметры обработки и методы обработки."
                   FontSize="14"
                   Foreground="#607D8B"
                   Margin="25 0 25 20"/>

        <Grid Grid.Row="2"
              Margin="25 0 25 25">

            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="20"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>

            <Border Grid.Row="0"
                    Background="White"
                    CornerRadius="10"
                    Padding="15"
                    BorderBrush="#DCE3EA"
                    BorderThickness="1">

                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>

                    <TextBlock Grid.Row="0"
                               Text="Детали и технологические данные"
                               FontSize="18"
                               FontWeight="SemiBold"
                               Foreground="#263238"
                               Margin="0 0 0 15"/>

                    <DataGrid Grid.Row="1"
                              x:Name="DetailsDataGrid"
                              AutoGenerateColumns="False"
                              CanUserAddRows="False"
                              CanUserDeleteRows="False"
                              IsReadOnly="True"
                              HeadersVisibility="Column"
                              GridLinesVisibility="Horizontal"
                              RowHeight="36"
                              FontSize="14"
                              AlternatingRowBackground="#F5F7FA"
                              BorderBrush="#DCE3EA"
                              BorderThickness="1">

                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Код детали"
                                                    Binding="{Binding [Код детали]}"
                                                    Width="90"/>

                            <DataGridTextColumn Header="Деталь"
                                                    Binding="{Binding [Деталь]}"
                                                    Width="*"/>

                            <DataGridTextColumn Header="Изделие"
                                                    Binding="{Binding [Изделие]}"
                                                    Width="*"/>

                            <DataGridTextColumn Header="Метод обработки"
                                                    Binding="{Binding [Метод обработки]}"
                                                    Width="*"/>

                            <DataGridTextColumn Header="№ операции"
                                                    Binding="{Binding [№ операции]}"
                                                    Width="100"/>

                            <DataGridTextColumn Header="Точность обработки"
                                                    Binding="{Binding [Точность обработки]}"
                                                    Width="140"/>

                            <DataGridTextColumn Header="Количество"
                                                    Binding="{Binding [Количество]}"
                                                    Width="100"/>

                            <DataGridTextColumn Header="Норма времени"
                                                    Binding="{Binding [Норма времени]}"
                                                    Width="120"/>

                            <DataGridTextColumn Header="Общее время"
                                                    Binding="{Binding [Общее время]}"
                                                    Width="120"/>
                        </DataGrid.Columns>
                    </DataGrid>
                </Grid>
            </Border>

            <Border Grid.Row="2"
                    Background="White"
                    CornerRadius="10"
                    Padding="15"
                    BorderBrush="#DCE3EA"
                    BorderThickness="1">

                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>

                    <TextBlock Grid.Row="0"
                               Text="Методы обработки"
                               FontSize="18"
                               FontWeight="SemiBold"
                               Foreground="#263238"
                               Margin="0 0 0 15"/>

                    <DataGrid Grid.Row="1"
                              x:Name="MethodsDataGrid"
                              AutoGenerateColumns="False"
                              CanUserAddRows="False"
                              CanUserDeleteRows="False"
                              IsReadOnly="True"
                              HeadersVisibility="Column"
                              GridLinesVisibility="Horizontal"
                              RowHeight="36"
                              FontSize="14"
                              AlternatingRowBackground="#F5F7FA"
                              BorderBrush="#DCE3EA"
                              BorderThickness="1">

                        <DataGrid.Columns>
                            <DataGridTextColumn Header="ID"
                                                Binding="{Binding [method_id]}"
                                                Width="100"/>

                            <DataGridTextColumn Header="Метод обработки"
                                                Binding="{Binding [method_name]}"
                                                Width="*"/>

                            <DataGridTextColumn Header="Достижимая точность"
                                                Binding="{Binding [achievable_accuracy]}"
                                                Width="220"/>
                        </DataGrid.Columns>
                    </DataGrid>
                </Grid>
            </Border>
        </Grid>
    </Grid>
</UserControl>
