<UserControl x:Class="MainShell.Manual.View.ChipStraighteningView"
             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:mw="http://www.maxwell-gp.com/"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">
    <UserControl.Resources>
        <ResourceDictionary>
            <Style x:Key="ChipStraighteningCardStyle" TargetType="GroupBox" BasedOn="{StaticResource ProcessCardGroupBoxStyle}">
                <Setter Property="Width" Value="320"/>
            </Style>

            <Style x:Key="ChipStraighteningLabelStyle" TargetType="Label" BasedOn="{StaticResource ProcessLabelStyle}">
                <Setter Property="Width" Value="82"/>
            </Style>
        </ResourceDictionary>
    </UserControl.Resources>

    <Grid Background="{StaticResource ProcessPageBackgroundBrush}">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Border Style="{StaticResource ProcessCameraHostBorderStyle}">
            <ContentControl Content="{Binding CameraAxisViewModel}" IsEnabled="{Binding Runner.IsRunning,Converter={StaticResource boolToInversionConverter}}"/>
        </Border>
        <GroupBox Grid.Column="1" Margin="0,4,4,4" Header="{DynamicResource ChipStraightening}" Style="{StaticResource ProcessWideCardGroupBoxStyle}">
            <Grid Margin="0">
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition Height="60"/>
                </Grid.RowDefinitions>
                <StackPanel Orientation="Vertical">
                    <GroupBox Style="{StaticResource ChipStraighteningCardStyle}" Header="{DynamicResource ChipAngle}">
                        <StackPanel>
                            <StackPanel Style="{StaticResource ProcessParameterRowStyle}">
                                <Label Style="{StaticResource ChipStraighteningLabelStyle}" Content="{DynamicResource ChipAngle}"/>
                                <mw:NumberBox Style="{StaticResource ProcessLargeNumberBoxStyle}" IsReadOnly="True" Value="{Binding ChipAngle}"/>
                            </StackPanel>
                        </StackPanel>
                    </GroupBox>
                </StackPanel>
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="1" Margin="0,8,0,0">
                    <Button Content="{DynamicResource Start}" Click="{mw:Action StartProcess}" Style="{StaticResource StartButtonStyle}"  Margin="5" 
                         IsEnabled="{Binding Runner.IsRunning, Converter={StaticResource boolToInversionConverter}}" />
                    <Button Content="{DynamicResource Stop}" Click="{mw:Action StopProcess}" Style="{StaticResource StopButtonStyle }"  Margin="5" 
                         IsEnabled="{Binding Runner.IsRunning}" />  
                </StackPanel>
            </Grid>
        </GroupBox>
    </Grid>
</UserControl>
