<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <DataTemplate x:Key="ForceActionNameTemplate">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="Name"/>
            <TextBox Grid.Column="1" Text="{Binding Name}"/>
        </Grid>
    </DataTemplate>
    <DataTemplate x:Key="ForceActionPointTemplate">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="200"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Row="0" Text="Set force into initial Gravity Center"/>
            <CheckBox Grid.Row="0" Grid.Column="1" Margin="3,5,3,5" IsChecked="{Binding SetInGravityCenter}"/>
            <TextBlock Grid.Row="1" Text="Center X"/>
            <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding CenterX}" IsEnabled="{Binding CoordEnable}"/>
            <TextBlock Grid.Row="2" Text="Center Y"/>
            <TextBox Grid.Row="2" Grid.Column="1" Text="{Binding CenterY}" IsEnabled="{Binding CoordEnable}"/>
        </Grid>
    </DataTemplate>
    <DataTemplate x:Key="ForceActionTemplate">
        <StackPanel Height="100">
            <ContentControl ContentTemplate="{StaticResource ForceActionNameTemplate}" Content="{Binding}"/>
            <ContentControl ContentTemplate="{StaticResource ForceActionPointTemplate}" Content="{Binding}"/>
        </StackPanel>
    </DataTemplate>
    <DataTemplate x:Key="CombinationListTemplate">
        <DataGrid x:Name="ForceGrid" Style="{StaticResource ItemsDataGrid}">
            <DataGrid.Columns>
                <DataGridComboBoxColumn Header="Limit state" Width="80" MinWidth="70" SelectedItemBinding="{Binding LimitState}" ItemsSource="{Binding Source={StaticResource LimitStateEnum}}"/>
                <DataGridComboBoxColumn Header="Duration" Width="80" MinWidth="70" SelectedItemBinding="{Binding CalcTerm}" ItemsSource="{Binding Source={StaticResource CalcTermEnum}}"/>
                <DataGridTextColumn Header="Moment Mx" Width="85" Binding="{Binding ForceTuple.Mx, Converter={StaticResource MomentConverter}, ValidatesOnExceptions=True}"/>
                <DataGridTextColumn Header="Moment My" Width="85" Binding="{Binding ForceTuple.My, Converter={StaticResource MomentConverter}, ValidatesOnExceptions=True}"/>
                <DataGridTextColumn Header="Force Nz" Width="85" Binding="{Binding ForceTuple.Nz, Converter={StaticResource ForceConverter}, ValidatesOnExceptions=True}"/>
            </DataGrid.Columns>
        </DataGrid>
    </DataTemplate>
    <DataTemplate x:Key="CombinationListTemplateWithButton">
        <Grid Grid.Row="1" DataContext="{Binding DesignForces}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="80"/>
            </Grid.ColumnDefinitions>
            <ContentControl ContentTemplate="{StaticResource CombinationListTemplate}" Content="{Binding}"/>
            <StackPanel Grid.Column="1">
                <Button Style="{StaticResource AddButton}"/>
                <Button Style="{StaticResource DeleteButton}"/>
                <Button Style="{StaticResource CopyButton}"/>
            </StackPanel>
        </Grid>
    </DataTemplate>
</ResourceDictionary>