<Window x:Class="StructureHelper.Windows.MainWindow.Materials.PartialFactorsView"
        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:StructureHelper.Windows.MainWindow.Materials"
        xmlns:vm="clr-namespace:StructureHelper.Windows.ViewModels.Materials"
        mc:Ignorable="d"
        d:DataContext="{d:DesignInstance vm:PartialFactorsViewModel}"
        Title="Material Partial Factors" Height="350" Width="500" WindowStartupLocation="CenterScreen">
    <Window.Resources>

    </Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="80"/>
        </Grid.ColumnDefinitions>
        <DataGrid ItemsSource="{Binding Items}" AutoGenerateColumns="False" SelectedItem="{Binding SelectedItem}">
            <DataGrid.RowStyle>
                <Style TargetType="DataGridRow">
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding Take}" Value="false">
                            <Setter Property="Background" Value="LightGray"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </DataGrid.RowStyle>
            <DataGrid.Columns>
                <DataGridComboBoxColumn Header="Stress state" Width="90" MinWidth="70" SelectedItemBinding="{Binding StressState}" ItemsSource="{Binding Source={StaticResource StressStateEnum}}"/>
                <DataGridComboBoxColumn Header="Limit state" Width="90" MinWidth="70" SelectedItemBinding="{Binding LimitState}" ItemsSource="{Binding Source={StaticResource LimitStateEnum}}"/>
                <DataGridComboBoxColumn Header="Duration" Width="90" MinWidth="70" SelectedItemBinding="{Binding CalcTerm}" ItemsSource="{Binding Source={StaticResource CalcTermEnum}}"/>
                <DataGridTextColumn Header="Value" Width="70" MinWidth="70" Binding="{Binding FactorValue, Converter={StaticResource PlainDouble}, ValidatesOnExceptions=True}"/>
            </DataGrid.Columns>
        </DataGrid>
        <StackPanel Grid.Column="1">
            <Button Style="{StaticResource AddButton}"/>
            <Button Style="{StaticResource DeleteButton}"/>
            <Button Style="{StaticResource CopyButton}"/>
        </StackPanel>
    </Grid>
</Window>
