<Window Name="AllWindow"
        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:SysIdentifi"
        xmlns:twinCatIdent="clr-namespace:TwinCatIdent"
        xmlns:twinCatBode="clr-namespace:TcBode"
        xmlns:System="clr-namespace:System;assembly=mscorlib" 
        xmlns:zed="clr-namespace:ZedGraph;assembly=ZedGraph"
        x:Class="SysIdentifi.MainWindow"
        mc:Ignorable="d"        Title="System Identification" Height="1169.05" Width="1334.435" Icon="Images/icon.ico"  Closed="Window_Closed" Background="DodgerBlue">

    <Window.Resources>
        <twinCatIdent:DataProperties x:Key="InDataProp"></twinCatIdent:DataProperties>
        <local:AsymptoteProperties x:Key="AsymptoteProp"></local:AsymptoteProperties>
        <Style x:Key="ErrorPropStyle" TargetType="Control">
            <Style.Triggers>
                <Trigger Property="Validation.HasError" Value="True">
                    <Setter Property="ToolTip" Value="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=(Validation.Errors)[0].ErrorContent}"></Setter>
                </Trigger>
            </Style.Triggers>
        </Style>
    </Window.Resources>

    <Grid Name="AllGrid">
        <Grid.RowDefinitions>
            <RowDefinition Height="70" />
            <RowDefinition Height="*" />
            <RowDefinition Height="35" />
        </Grid.RowDefinitions>

        <Grid Grid.Row="0" Name="ControlGrid"  Background="LightSteelBlue">
            <Menu x:Name="menu" Height="30"  VerticalAlignment="Top"  >
                <MenuItem Header="_File">
                    <MenuItem Header="Load data" Name="MenuLoadData" Click="button_LoadData_Click" ></MenuItem>
                    <MenuItem Header="Load Tc Bode Plot" Name="MenuLoadTcBodeData" Click="button_LoadTcBodePlotData_Click" ></MenuItem>
                    <MenuItem Header="Load motion profile data" Name="MenuLoadProfData" Click="button_LoadProfData_Click" ></MenuItem>
                    <MenuItem Header="Load generator settings" Name="MenuLoadSetData" Click="button_LoadSettings_Click" ></MenuItem>
                    <MenuItem Header="Save data" Name="MenuSaveData" Click="button_SaveData_Click" IsEnabled="False"></MenuItem>
                    <MenuItem Header="Save generator settings" Name="MenuSaveSettingsData" Click="button_SaveSettingsData_Click"></MenuItem>
                    <MenuItem Header="Delete all" Name="MenuDeleteAll" Click="button_DeleteAllCurve_Click" IsEnabled="False" ></MenuItem>
                    <MenuItem Header="Asymptote" Name="MenuAsymptote" Click="button_Asymptote_Click"></MenuItem>
                    <Separator/>
                    <MenuItem Header="Exit" Name="MenuExit" Click="MenuExit_Click" ></MenuItem>
                </MenuItem>
                <MenuItem Header="_Target">
                    <MenuItem Header="Connect" Name="MenuConnect" Click="button_Connect_Click"></MenuItem>
                    <MenuItem Header="Run" Name="MenuRun" Click="button_Run_Click" IsEnabled="False"></MenuItem>
                    <MenuItem Header="Stop" Name="MenuStop" Click="button_Stop_Click" IsEnabled="False"></MenuItem>
                    <MenuItem Header="Reset error" Name="MenuResetError" Click="button_ResetError_Click"></MenuItem>
                </MenuItem>
                <MenuItem Header="_View">
                    <MenuItem Header="Reset zoom" Name="MenuResetZoom" Click="button_ResetZoom_Click"></MenuItem>
                    <CheckBox Name="MenuChBDispListCurves" Content="List curves" IsChecked="True" Click="MenuChBDispListCurves_Click"/>
                    <CheckBox Name="MenuChBDispCurrentGraph" Content="Current graph" IsChecked="True" Click="MenuChBDispCurrentGraph_Click"/>
                    <CheckBox Name="MenuChBDispMagnitudeGraph" Content="Magnitude graph" IsChecked="True" Click="MenuChBDispMagnitudeGraph_Click"/>
                    <CheckBox Name="MenuChBDispPhaseGraph" Content="Phase graph" IsChecked="True" Click="MenuChBDispPhaseGraph_Click"/>
                    <CheckBox Name="MenuChBDispStepResponse" Content="Step response" IsChecked="True" Click="MenuChBDispStepResponse_Click" />
                    <CheckBox Name="MenuChBDispStepResponseSymbols" Content="Step response symbols" IsChecked="False" Click="MenuChBDispStepResponseSymbols_Click"/>
                    <CheckBox Name="MenuChBDispProperties" Content="Properties" IsChecked="True" Click="MenuChBDispProperties_Click" />
                </MenuItem>
                <MenuItem Header="_Help">
                    <MenuItem Header="Help - Sk" Name="MenuHelpSk" Click="MenuHelpSk_Click"></MenuItem>
                    <MenuItem Header="Help - En" Name="MenuHelpEn" Click="MenuHelpEn_Click"></MenuItem>
                </MenuItem>
            </Menu>
            <StackPanel Orientation="Horizontal" Margin="0,34,0,0">
                <Button x:Name="button_Connect" Content="Connect" HorizontalAlignment="Left" Margin="4,0,0,0" VerticalAlignment="Top" Width="65" RenderTransformOrigin="-0.836,0.241" Height="33" Click="button_Connect_Click"/>
                <Button x:Name="button_Run" Content="Run" HorizontalAlignment="Left" Margin="4,0,0,0" VerticalAlignment="Top" Width="66" RenderTransformOrigin="-0.836,0.241" Height="33" Click="button_Run_Click" IsEnabled="False"/>
                <Button x:Name="button_Stop" Content="Stop" HorizontalAlignment="Left" Margin="4,0,0,0" VerticalAlignment="Top" Width="66" RenderTransformOrigin="-0.836,0.241" Height="33"  IsEnabled="False" Click="button_Stop_Click"/>
                <Button x:Name="button_SaveData" Content="Save data" HorizontalAlignment="Left" Margin="4,0,0,0" VerticalAlignment="Top" Width="65" RenderTransformOrigin="-0.836,0.241" Height="33"  IsEnabled="False" Click="button_SaveData_Click"/>
                <Button x:Name="button_LoadData" Content="Load data" HorizontalAlignment="Left" Margin="4,0,0,0" VerticalAlignment="Top" Width="65" RenderTransformOrigin="-0.836,0.241" Height="33" Click="button_LoadData_Click"/>
                <Button x:Name="button_ResetError" Content="Reset error" HorizontalAlignment="Left" Margin="4,0,0,0" VerticalAlignment="Top" Width="70" RenderTransformOrigin="-0.836,0.241" Height="33" Click="button_ResetError_Click" />
                <Button x:Name="button_ResetZoom" Content="Reset zoom" HorizontalAlignment="Left" Margin="4,0,0,0" VerticalAlignment="Top" Width="70" RenderTransformOrigin="-0.836,0.241" Height="33" Click="button_ResetZoom_Click"/>
                <Button x:Name="button_DeleteAllCurve" Content="Delete all" HorizontalAlignment="Left" Margin="4,0,0,0" VerticalAlignment="Top" Width="70" RenderTransformOrigin="-0.836,0.241" Height="33" Click="button_DeleteAllCurve_Click" IsEnabled="False"/>
                <Button x:Name="button_Asymptote" Content="Asymptote" HorizontalAlignment="Left" Margin="4,0,0,0" VerticalAlignment="Top" Width="70" RenderTransformOrigin="-0.836,0.241" Height="33" Click="button_Asymptote_Click"/>
            </StackPanel>

        </Grid>

        <Grid Grid.Row="1" Name="ViewGrid" >
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="250" />
                <ColumnDefinition Width="5" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="5" />
                <ColumnDefinition Width="330" />
            </Grid.ColumnDefinitions>

            <GridSplitter Grid.Column="1" Width="5" HorizontalAlignment="Stretch" />
            <GridSplitter Grid.Column="3" Width="5" HorizontalAlignment="Stretch" />

            <Grid Name="ListCurvesCurrentGraph" Grid.Column="0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="*" />
                    <RowDefinition Height="5" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>

                <GridSplitter Grid.Row="1" Grid.Column="0" Height="5" HorizontalAlignment="Stretch"  />

                <Grid Name="ListCurves" Grid.Row="0" >
                    <ScrollViewer ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
                        <TreeView x:Name="treeViewListCurves" />
                    </ScrollViewer>
                </Grid>

                <Grid Name="GraphCurrent" Grid.Row="2" >
                    
                        <StackPanel Orientation="Horizontal" Height="28" VerticalAlignment="Top">
                            <Label Content="Average current:" Height="26" HorizontalAlignment="Left" VerticalAlignment="Top" />
                            <TextBox x:Name="textBox_AverageCurrent" VerticalAlignment="Top" Height="26" HorizontalAlignment="Left" Width="70" Margin="0,2,0,0" IsReadOnly="True" ></TextBox>
                            <Label Content="%" Height="26" HorizontalAlignment="Left" VerticalAlignment="Top" />
                        </StackPanel>
                        <WindowsFormsHost Name="windowsFormsHost3" Margin="0,28,0,0" >
                            <zed:ZedGraphControl x:Name="PlotChartCurrent" >
                            </zed:ZedGraphControl>
                        </WindowsFormsHost>
                    
                </Grid>


            </Grid>

            <Grid Name="GraphGrid" Grid.Column="2">
                <Grid.RowDefinitions>
                    <RowDefinition Height="25" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="5" />
                    <RowDefinition Height="*" />
                    <RowDefinition Height="25" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>

                <Grid Name="Legend" Grid.Row="0" >
                    <StackPanel Orientation="Horizontal">
                        <Label  Height="26" Content="Closed loop - solid line" HorizontalAlignment="Left"  VerticalAlignment="Top"/>
                        <Label  Height="26" Content="__________" HorizontalAlignment="Left"  VerticalAlignment="Top" FontWeight="Bold"/>
                        <Label  Height="26" Content="Open loop - doted line" HorizontalAlignment="Left"  VerticalAlignment="Top" Margin="30,0,0,0"/>
                        <Label  Height="26" Content=". . . . . " HorizontalAlignment="Left"  VerticalAlignment="Top" FontWeight="Bold"/>
                        <Label  Height="26" x:Name="LabelProcessLegend1" Content="Process - dashed line" HorizontalAlignment="Left"  VerticalAlignment="Top" Margin="30,0,0,0" Visibility="Hidden"/>
                        <Label  Height="26" x:Name="LabelProcessLegend2" Content="_ _ _ _ _ " HorizontalAlignment="Left"  VerticalAlignment="Top" FontWeight="Bold" Visibility="Hidden"/>
                    </StackPanel>
                </Grid>

                <Grid Name="GraphMagnitude" Grid.Row="1" >
                    <WindowsFormsHost  DockPanel.Dock="Left"  HorizontalAlignment="Stretch"  Name="windowsFormsHost1" >
                        <zed:ZedGraphControl x:Name="PlotChartMagnitude" />
                    </WindowsFormsHost>
                </Grid>

                <Grid Grid.Row="3" >
                    <WindowsFormsHost DockPanel.Dock="Left"  HorizontalAlignment="Stretch"  Name="windowsFormsHost2">
                        <zed:ZedGraphControl x:Name="PlotChartPhase" >
                        </zed:ZedGraphControl>
                    </WindowsFormsHost>
                </Grid>

                <Grid Name="LegendStepResp" Grid.Row="4" >
                    <StackPanel Orientation="Horizontal">
                        <Label  Height="26" Content="Input - doted line" HorizontalAlignment="Left"  VerticalAlignment="Top" />
                        <Label  Height="26" Content=". . . . . " HorizontalAlignment="Left"  VerticalAlignment="Top" FontWeight="Bold"/>
                        <Label  Height="26" Content="Output - solid line" HorizontalAlignment="Left"  VerticalAlignment="Top" Margin="30,0,0,0"/>
                        <Label  Height="26" Content="__________" HorizontalAlignment="Left"  VerticalAlignment="Top" FontWeight="Bold"/>
                    </StackPanel>
                </Grid>

                <Grid Grid.Row="5" >
                    <WindowsFormsHost DockPanel.Dock="Left"  HorizontalAlignment="Stretch"  Name="windowsFormsHost4">
                        <zed:ZedGraphControl x:Name="PlotChartStepResponse" >
                        </zed:ZedGraphControl>
                    </WindowsFormsHost>
                </Grid>

            </Grid>

            <Grid Name="PropertiesGrid" Grid.Column="4" >
                <ScrollViewer ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
                    <StackPanel>
                        <Label Content="Target and drive parameters" HorizontalAlignment="Left"  VerticalAlignment="Top" FontSize="14" FontWeight="Bold" Margin="57,0,0,0" />
                        <StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Left">
                            <StackPanel HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Label x:Name="label_AmsNetIDTarget" Height="26" Content="AmsNetID:" HorizontalAlignment="Left"  VerticalAlignment="Top"/>
                                <Label x:Name="label_AdsPort" Height="26" Content="Ads port:" HorizontalAlignment="Left"  VerticalAlignment="Top"/>
                                <Label x:Name="label_ExternGenerator" Height="26" Content="Ext. generator:" HorizontalAlignment="Left"  VerticalAlignment="Top"/>
                                <Label x:Name="label_TaskTime" Height="26" Content="Task time:" HorizontalAlignment="Left"  VerticalAlignment="Top"/>
                                <Label x:Name="label_NameAxis" Height="26" Content="Name of axis:" HorizontalAlignment="Left"  VerticalAlignment="Top"/>
                                <Label x:Name="label_Units" Height="26" Content="Units:" HorizontalAlignment="Left"  VerticalAlignment="Top"/>
                                <Label x:Name="label_LinearMotor" Height="26" Content="Linear motor:" HorizontalAlignment="Left"  VerticalAlignment="Top"/>
                                <Label x:Name="label_XScale" Height="26" Content="x-Scale:" HorizontalAlignment="Left"  VerticalAlignment="Top"/>
                                <Label x:Name="label_VScale" Height="26" Content="v-Scale:" HorizontalAlignment="Left"  VerticalAlignment="Top"/>
                                <Label x:Name="label_FeedConstant" Height="26" Content="Feed constant:" HorizontalAlignment="Left"  VerticalAlignment="Top"/>
                                <Label x:Name="label_Date" Height="26" Content="Date:" HorizontalAlignment="Left" VerticalAlignment="Top"/>
                            </StackPanel>

                            <StackPanel  VerticalAlignment="Top" >
                                <TextBox Style="{StaticResource ErrorPropStyle}" x:Name="textBox_AmsNetIdTarget" Height="26" TextWrapping="Wrap" PreviewTextInput="NumberDoubleValidationTextBox" VerticalAlignment="Top" MaxWidth="400" >
                                    <TextBox.Text>
                                        <Binding Source="{StaticResource InDataProp}" Path="AmsNetId" >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule></ExceptionValidationRule>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </TextBox.Text>
                                </TextBox>
                                <TextBox x:Name="textBox_AdsPort" Style="{StaticResource ErrorPropStyle}"  Height="26" TextWrapping="Wrap"  VerticalAlignment="Top" Margin="0,0,0,0"  MaxWidth="400" >
                                    <TextBox.Text>
                                        <Binding Source="{StaticResource InDataProp}" Path="sAdsPort" >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </TextBox.Text>
                                </TextBox>

                                <TextBox x:Name="textBox_ExternGenerator" Style="{StaticResource ErrorPropStyle}" Height="26" TextWrapping="Wrap" VerticalAlignment="Top" Margin="0,0,0,0"  MaxWidth="400" >
                                    <TextBox.Text>
                                        <Binding Source="{StaticResource InDataProp}" Path="PathExtGen" >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </TextBox.Text>
                                </TextBox>
                                <TextBox x:Name="textBox_TaskTime" Style="{StaticResource ErrorPropStyle}" Height="26" TextWrapping="Wrap" IsReadOnly="True" Background="LightGray" VerticalAlignment="Top" MaxWidth="400" >
                                    <TextBox.Text>
                                        <Binding Source="{StaticResource InDataProp}" Path="sTaskTime" >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </TextBox.Text>
                                </TextBox>
                                <TextBox x:Name="textBox_NameAxis" Style="{StaticResource ErrorPropStyle}" Height="26" TextWrapping="Wrap" VerticalAlignment="Top" MaxWidth="400" >
                                    <TextBox.Text>
                                        <Binding Source="{StaticResource InDataProp}" Path="NameAxis" >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </TextBox.Text>
                                </TextBox>
                                <ComboBox x:Name="comboBox_Units" Style="{StaticResource ErrorPropStyle}" VerticalAlignment="Top" HorizontalAlignment="Left" Height="26" Width="134" SelectionChanged="comboBox_Units_SelectionChanged" >
                                    <ComboBoxItem IsSelected="True" Content="°"/>
                                    <ComboBoxItem Content="mm"/>
                                    <ComboBoxItem Content="none"/>
                                    <ComboBox.SelectedIndex>
                                        <Binding Source="{StaticResource InDataProp}" Path="intUnits"  >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </ComboBox.SelectedIndex>
                                </ComboBox>
                                <CheckBox x:Name="checkBox_IsLinear" Style="{StaticResource ErrorPropStyle}" MaxWidth="400" VerticalAlignment="Top" Height="19" Margin="0,7,0,0" >
                                    <CheckBox.IsChecked>
                                        <Binding Source="{StaticResource InDataProp}" Path="IsLinear"  >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </CheckBox.IsChecked>
                                </CheckBox>
                                <TextBox x:Name="textBox_xScale" Style="{StaticResource ErrorPropStyle}" Height="26" TextWrapping="Wrap" PreviewTextInput="NumberPositiveDoubleValidationTextBox" VerticalAlignment="Top" MaxWidth="400">
                                    <TextBox.Text>
                                        <Binding Source="{StaticResource InDataProp}" Path="sxScale"  >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </TextBox.Text>
                                </TextBox>
                                <TextBox x:Name="textBox_vScale" Style="{StaticResource ErrorPropStyle}" Height="26" Margin="0,0,0,0" TextWrapping="Wrap" PreviewTextInput="NumberPositiveDoubleValidationTextBox" VerticalAlignment="Top" MaxWidth="400" >
                                    <TextBox.Text>
                                        <Binding Source="{StaticResource InDataProp}" Path="svScale"  >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </TextBox.Text>
                                </TextBox>
                                <TextBox x:Name="textBox_FeedConstant" Style="{StaticResource ErrorPropStyle}" Height="26" Margin="0,0,0,0" TextWrapping="Wrap" PreviewTextInput="NumberPositiveDoubleValidationTextBox" VerticalAlignment="Top" MaxWidth="400" >
                                    <TextBox.Text>
                                        <Binding Source="{StaticResource InDataProp}" Path="sFeedConstant" >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </TextBox.Text>
                                </TextBox>
                                <TextBox x:Name="textBox_Date" Style="{StaticResource ErrorPropStyle}" Height="26" Margin="0,0,0,0" TextWrapping="Wrap"  VerticalAlignment="Top" IsReadOnly="True" Background="LightGray" MaxWidth="400" >
                                    <TextBox.Text>
                                        <Binding Source="{StaticResource InDataProp}" Path="sDateTime"  >
                                        </Binding>
                                    </TextBox.Text>
                                </TextBox>
                            </StackPanel>

                            <StackPanel  HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Label Height="26" HorizontalAlignment="Left" VerticalAlignment="Top" />
                                <Label Height="26" HorizontalAlignment="Left" VerticalAlignment="Top" />
                                <Label Height="26" HorizontalAlignment="Left" VerticalAlignment="Top" />
                                <Label x:Name="label_UnitBaseTime" Height="26" Content="[ms]" HorizontalAlignment="Left"  VerticalAlignment="Top" />
                                <Label Height="26" HorizontalAlignment="Left" VerticalAlignment="Top" />
                                <Label Height="26" HorizontalAlignment="Left" VerticalAlignment="Top" />
                            </StackPanel>
                        </StackPanel>

                        <Label Content="Generator parameters" HorizontalAlignment="Left"  VerticalAlignment="Top" FontSize="14" FontWeight="Bold" Margin="74,0,0,0"/>

                        <StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Left" >
                            <StackPanel  VerticalAlignment="Top" HorizontalAlignment="Left">
                                <Label  Content="Count of repeats:" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  Content="Period:" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  Content="Ampl. of main mov.:" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  Content="Ampl. of auxiliary mov.:" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  Content="Freq. of auxiliary mov.:" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  Content="Control mode:" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  Content="Type of input signal:" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  Content="Allowed position range:" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  Content="Enable check pos. range:" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  Content="Allowed torque range:" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  Content="Enable check tor. range:" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                            </StackPanel>

                            <StackPanel VerticalAlignment="Top">
                                <TextBox x:Name="textBox_CountOfRepeat" Style="{StaticResource ErrorPropStyle}" TextWrapping="Wrap" PreviewTextInput="NumberValidationTextBox" Margin="0,0,0,0" TextChanged="textBox_CountOfRepeat_TextChanged" Height="26" VerticalAlignment="Top" MaxWidth="400">
                                    <TextBox.Text>
                                        <Binding Source="{StaticResource InDataProp}" Path="sCountRepeat"  >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </TextBox.Text>
                                </TextBox>
                                <TextBox x:Name="textBox_Period" Style="{StaticResource ErrorPropStyle}" TextWrapping="Wrap" PreviewTextInput="NumberPositiveDoubleValidationTextBox"  Margin="0,0,0,0" Height="26" VerticalAlignment="Top" MaxWidth="400" LostFocus="textBox_Period_LostFocus">
                                    <TextBox.Text>
                                        <Binding Source="{StaticResource InDataProp}" Path="sPeriodInputSignal"  >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </TextBox.Text>
                                </TextBox>
                                <TextBox x:Name="textBox_Amplitude" Style="{StaticResource ErrorPropStyle}" TextWrapping="Wrap" PreviewTextInput="NumberDoubleValidationTextBox" Margin="0,0,0,0" Height="26" VerticalAlignment="Top" MaxWidth="400">
                                    <TextBox.Text>
                                        <Binding Source="{StaticResource InDataProp}" Path="sAmplitudeInputSignal"  >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </TextBox.Text>
                                </TextBox>
                                <TextBox x:Name="textBox_AmplitudeAuxMove" Style="{StaticResource ErrorPropStyle}" TextWrapping="Wrap" PreviewTextInput="NumberDoubleValidationTextBox" Margin="0,0,0,0" Height="26" VerticalAlignment="Top" MaxWidth="400">
                                    <TextBox.Text>
                                        <Binding Source="{StaticResource InDataProp}" Path="sAmplAuxMove"  >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </TextBox.Text>
                                </TextBox>
                                <TextBox x:Name="textBox_FrequencyAuxMove" Style="{StaticResource ErrorPropStyle}" TextWrapping="Wrap" PreviewTextInput="NumberPositiveDoubleValidationTextBox" Margin="0,0,0,0" Height="26" VerticalAlignment="Top" MaxWidth="400">
                                    <TextBox.Text>
                                        <Binding Source="{StaticResource InDataProp}" Path="sFreqAuxMove"  >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </TextBox.Text>
                                </TextBox>
                                <ComboBox x:Name="comboBox_ModeControl" Style="{StaticResource ErrorPropStyle}" VerticalAlignment="Top" HorizontalAlignment="Left" SelectionChanged="comboBox_ModeControl_SelectionChanged" Height="26" Width="134" >
                                    <ComboBoxItem Content="Position Control"/>
                                    <ComboBoxItem IsSelected="True" Content="Velocity Control"/>
                                    <ComboBoxItem Content="Torque Control"/>
                                    <ComboBoxItem Content="Unknown Control"/>
                                    <ComboBox.SelectedIndex>
                                        <Binding Source="{StaticResource InDataProp}" Path="intControlMode"  >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </ComboBox.SelectedIndex>
                                </ComboBox>
                                <ComboBox x:Name="comboBox_SelectedInputSignal" Style="{StaticResource ErrorPropStyle}" VerticalAlignment="Top" HorizontalAlignment="Left" SelectionChanged="comboBox_SelectedInputSignal_SelectionChanged" Height="26" Width="134">
                                    <ComboBox.SelectedIndex>
                                        <Binding Source="{StaticResource InDataProp}" Path="IdInputSignal"  >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </ComboBox.SelectedIndex>
                                </ComboBox>
                                <TextBox x:Name="textBox_AllowPositionRange" Style="{StaticResource ErrorPropStyle}" TextWrapping="Wrap" PreviewTextInput="NumberPositiveDoubleValidationTextBox" Margin="0,0,0,0" Height="26" VerticalAlignment="Top" MaxWidth="400" GotFocus="textBox_AllowPositionRange_GotFocus">
                                    <TextBox.Text>
                                        <Binding Source="{StaticResource InDataProp}" Path="sAllowedPositionRange"  >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </TextBox.Text>
                                </TextBox>
                                <CheckBox x:Name="checkBox_EnablePositionRangeCheck" Style="{StaticResource ErrorPropStyle}" MaxWidth="400" VerticalAlignment="Top" Height="19" Margin="0,7,0,0" >
                                    <CheckBox.IsChecked>
                                        <Binding Source="{StaticResource InDataProp}" Path="EnablePositionRangeCheck"  >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </CheckBox.IsChecked>
                                </CheckBox>
                                <TextBox x:Name="textBox_AllowedTorqueRangeIdent" Style="{StaticResource ErrorPropStyle}" TextWrapping="Wrap" PreviewTextInput="NumberPositiveDoubleValidationTextBox" Margin="0,0,0,0" Height="26" VerticalAlignment="Top" MaxWidth="400" GotFocus="textBox_AllowedTorqueRangeIdent_GotFocus">
                                    <TextBox.Text>
                                        <Binding Source="{StaticResource InDataProp}" Path="sAllowedTorqueRangeIdent"  >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </TextBox.Text>
                                </TextBox>
                                <CheckBox x:Name="checkBox_EnableTorqueRangeCheckIdent" Style="{StaticResource ErrorPropStyle}" MaxWidth="400" VerticalAlignment="Top" Height="19" Margin="0,7,0,0" >
                                    <CheckBox.IsChecked>
                                        <Binding Source="{StaticResource InDataProp}" Path="EnableTorqueRangeCheckIdent"  >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </CheckBox.IsChecked>
                                </CheckBox>
                            </StackPanel>
                            <StackPanel VerticalAlignment="Top"  HorizontalAlignment="Left">
                                <Label Height="26" VerticalAlignment="Top" HorizontalAlignment="Left"></Label>
                                <Label  Content="[ms]" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  x:Name="LabelUnitAmplitude" Content="[°/s]" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  x:Name="LabelUnitAmplAuxMove" Content="[°/s]" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  x:Name="LabelUnitFreqAuxMove" Content="[Hz]" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label Height="26" VerticalAlignment="Top" HorizontalAlignment="Left"></Label>
                                <Label Height="26" VerticalAlignment="Top" HorizontalAlignment="Left"></Label>
                                <Label  x:Name="LabelUnitPositonRange" Content="[°]" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label Height="26" VerticalAlignment="Top" HorizontalAlignment="Left"></Label>
                                <Label  Content="[%]" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                            </StackPanel>
                        </StackPanel>

                        <Label Content="Step response parameters" HorizontalAlignment="Left"  VerticalAlignment="Top" FontSize="14" FontWeight="Bold" Margin="74,0,0,0"/>
                        <StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Left" >
                            <StackPanel  VerticalAlignment="Top" HorizontalAlignment="Left">
                                <Label  Content="Pre-trigger:" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  Content="Time:" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  Content="Init. level:" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  Content="Final level:" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  Content="Allowed torque range:" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  Content="Enable check tor. range:" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                            </StackPanel>

                            <StackPanel VerticalAlignment="Top">
                                <TextBox x:Name="textBox_PreTriggerStep" Style="{StaticResource ErrorPropStyle}" TextWrapping="Wrap" PreviewTextInput="NumberPositiveDoubleValidationTextBox" Margin="0,0,0,0" Height="26" VerticalAlignment="Top" MaxWidth="400" MinWidth="130" LostFocus="textBox_PreTriggerStep_LostFocus">
                                    <TextBox.Text>
                                        <Binding Source="{StaticResource InDataProp}" Path="sStepPreTrigger"  >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </TextBox.Text>
                                </TextBox>
                                <TextBox x:Name="textBox_TimeStep" Style="{StaticResource ErrorPropStyle}" TextWrapping="Wrap" PreviewTextInput="NumberDoubleValidationTextBox"  Margin="0,0,0,0" Height="26" VerticalAlignment="Top" MaxWidth="400" LostFocus="textBox_TimeStep_LostFocus">
                                    <TextBox.Text>
                                        <Binding Source="{StaticResource InDataProp}" Path="sStepTime"  >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </TextBox.Text>
                                </TextBox>
                                <TextBox x:Name="textBox_InitLevelStep" Style="{StaticResource ErrorPropStyle}" TextWrapping="Wrap" PreviewTextInput="NumberDoubleValidationTextBox" Margin="0,0,0,0" Height="26" VerticalAlignment="Top" MaxWidth="400">
                                    <TextBox.Text>
                                        <Binding Source="{StaticResource InDataProp}" Path="sStepInitLevel"  >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </TextBox.Text>
                                </TextBox>
                                <TextBox x:Name="textBox_FinalLevelStep" Style="{StaticResource ErrorPropStyle}" TextWrapping="Wrap" PreviewTextInput="NumberPositiveDoubleValidationTextBox" Margin="0,0,0,0" Height="26" VerticalAlignment="Top" MaxWidth="400">
                                    <TextBox.Text>
                                        <Binding Source="{StaticResource InDataProp}" Path="sStepFinalLevel"  >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </TextBox.Text>
                                </TextBox>
                                <TextBox x:Name="textBox_AllowedTorqueRangeStRes" Style="{StaticResource ErrorPropStyle}" TextWrapping="Wrap" PreviewTextInput="NumberPositiveDoubleValidationTextBox" Margin="0,0,0,0" Height="26" VerticalAlignment="Top" MaxWidth="400" GotFocus="textBox_AllowedTorqueRangeStRes_GotFocus">
                                    <TextBox.Text>
                                        <Binding Source="{StaticResource InDataProp}" Path="sAllowedTorqueRangeStRes"  >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </TextBox.Text>
                                </TextBox>
                                <CheckBox x:Name="checkBox_EnableTorqueRangeCheckStRes" Style="{StaticResource ErrorPropStyle}" MaxWidth="400" VerticalAlignment="Top" Height="19" Margin="0,7,0,0" >
                                    <CheckBox.IsChecked>
                                        <Binding Source="{StaticResource InDataProp}" Path="EnableTorqueRangeCheckStRes"  >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </CheckBox.IsChecked>
                                </CheckBox>
                            </StackPanel>
                            <StackPanel VerticalAlignment="Top"  HorizontalAlignment="Left">
                                <Label  Content="[ms]" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  Content="[ms]" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  x:Name="LabelUnitInitLevelStep" Content="[°/s]" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  x:Name="LabelUnitFinalLevelStep" Content="[°/s]" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  Content="[%]" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                            </StackPanel>
                        </StackPanel>

                        <Label Content="Analysis parameters" HorizontalAlignment="Left"  VerticalAlignment="Top" FontSize="14" FontWeight="Bold" Margin="80,0,0,0"/>
                        <StackPanel Orientation="Horizontal" VerticalAlignment="Top" HorizontalAlignment="Left">
                            <StackPanel VerticalAlignment="Top" HorizontalAlignment="Left">
                                <Label  Content="Mode of spect. analys.:" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  Content="Lenght of window:" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  Content="Check phase overflow:" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                                <Label  Content="Offset I/O data:" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"/>
                            </StackPanel>
                            <StackPanel VerticalAlignment="Top">
                                <ComboBox x:Name="comboBoxModeAnalysis" Style="{StaticResource ErrorPropStyle}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="120" Height="26" SelectionChanged="comboBoxModeAnalysis_SelectionChanged">
                                    <ComboBox.SelectedIndex>
                                        <Binding Source="{StaticResource InDataProp}" Path="intModeSpectAnalys" >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </ComboBox.SelectedIndex>
                                </ComboBox>
                                <TextBox x:Name="textBox_LengthWindow" Style="{StaticResource ErrorPropStyle}" Height="26" Margin="0,0,0,0" TextWrapping="Wrap" VerticalAlignment="Top" PreviewTextInput="NumberValidationTextBox" TextChanged="textBox_LengthWindow_TextChanged" MaxWidth="400" >
                                    <TextBox.Text>
                                        <Binding Source="{StaticResource InDataProp}" Path="sLengthWindow" >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </TextBox.Text>
                                </TextBox>
                                <CheckBox x:Name="checkBox_CheckPhaseOwerflow" Style="{StaticResource ErrorPropStyle}" Height="19"  VerticalAlignment="Top" MaxWidth="400" Click="checkBox_CheckPhaseOwerflow_Click" Margin="0,7,0,0">
                                    <CheckBox.IsChecked>
                                        <Binding Source="{StaticResource InDataProp}" Path="CheckPhaseOverflow"  >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </CheckBox.IsChecked>
                                </CheckBox>
                                <TextBox x:Name="textBox_OffsetIOdata" Style="{StaticResource ErrorPropStyle}" Height="26" Margin="0,0,0,0" TextWrapping="Wrap" VerticalAlignment="Top" PreviewTextInput="NumberIntValidationTextBox" TextChanged="textBox_LengthWindow_TextChanged" MaxWidth="400" >
                                    <TextBox.Text>
                                        <Binding Source="{StaticResource InDataProp}" Path="sOffsetIOdata" >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </TextBox.Text>
                                </TextBox>
                            </StackPanel>
                        </StackPanel>

                        <Label Content="Graph parameters" HorizontalAlignment="Left"  VerticalAlignment="Top" FontSize="14" FontWeight="Bold" Margin="90,0,0,0"/>
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Top">
                            <StackPanel HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Label Content="X-axis:" Height="26" HorizontalAlignment="Left" VerticalAlignment="Top"/>
                                <Label Content="Absolute current:" Height="26" HorizontalAlignment="Left" VerticalAlignment="Top" />
                            </StackPanel>
                            <StackPanel HorizontalAlignment="Left" VerticalAlignment="Top">
                                <StackPanel HorizontalAlignment="Left" VerticalAlignment="Top" Orientation="Horizontal" >
                                    <RadioButton x:Name="radioButton_Linear" Content="Linear" Checked="radioButton_Linear_Checked" Width="66" Height="26"/>
                                    <RadioButton x:Name="radioButton_Logaritmic" Content="Logarithmic" IsChecked="True" Checked="radioButton_Logaritmic_Checked" Height="26" />
                                </StackPanel>
                                <CheckBox x:Name="checkBox_AbsCurrent" Content="" HorizontalAlignment="Left" VerticalAlignment="Top" IsChecked="True" Height="19" Margin="0,7,0,0" Click="checkBox_AbsCurrent_Click" />
                            </StackPanel>
                        </StackPanel>

                        <Label Content="Notes" HorizontalAlignment="Left"  VerticalAlignment="Top" FontSize="14" FontWeight="Bold" Margin="125,0,0,0"/>
                        <Button x:Name="button_EditNotes" Content="Edit" HorizontalAlignment="Left" VerticalAlignment="Top" Width="50" RenderTransformOrigin="-0.836,0.241" Height="25" Click="button_EditNotes_Click" Margin="2,0,0,0" />
                        <TextBox x:Name="textBox_Notes" Style="{StaticResource ErrorPropStyle}" Height="197" Margin="2,0,0,0" TextWrapping="Wrap" VerticalAlignment="Top" AcceptsReturn="True" AcceptsTab="True" MinWidth="300" MaxWidth="400" HorizontalAlignment="Left">
                            <TextBox.Text>
                                <Binding Source="{StaticResource InDataProp}" Path="Notes" >
                                    <Binding.ValidationRules>
                                        <ExceptionValidationRule/>
                                    </Binding.ValidationRules>
                                </Binding>
                            </TextBox.Text>
                        </TextBox>

                    </StackPanel>
                </ScrollViewer>
            </Grid>

            <Grid Name="PropertiesTcBodeGrid" Grid.Column="4" Visibility="Hidden" >
                <ScrollViewer ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
                    <StackPanel Margin="5">
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Top">
                            <StackPanel HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Label Content="Title" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"></Label>
                                <Label Content="Name" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"></Label>
                                <Label Content="CycleTime" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"></Label>
                                <Label Content="Mode" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"></Label>
                                <Label Content="Measure time" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"></Label>
                                <Label Content="SignalAmplitudePosition" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"></Label>
                                <Label Content="SignalAmplitudeVelocity" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"></Label>
                                <Label Content="SignalAmplitudeTorque" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"></Label>
                                <Label Content="BaseAmplitude" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"></Label>
                                <Label Content="TorqueOffset" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"></Label>
                                <Label Content="BaseFrequency" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"></Label>
                                <Label Content="DeadTime" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"></Label>
                                <Label Content="ProportionalGain" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"></Label>
                                <Label Content="IntegralTime" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"></Label>
                                <Label Content="MinFrequency" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"></Label>
                                <Label Content="MaxFrequency" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"></Label>
                                <Label Content="FrequencySteps" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"></Label>
                            </StackPanel>

                            <StackPanel VerticalAlignment="Top">
                                <TextBox x:Name="textBox_TcBodeTitle" Height="26"  TextWrapping="Wrap" VerticalAlignment="Top" MinWidth="120" MaxWidth="400" Text="{Binding TcB_Title}" IsReadOnly="True"/>
                                <TextBox x:Name="textBox_TcBodeName" Height="26"  TextWrapping="Wrap" VerticalAlignment="Top" MinWidth="120" MaxWidth="400" Text="{Binding TcB_Name}" IsReadOnly="True"/>
                                <TextBox x:Name="textBox_TcBodeCycleTime" IsReadOnly="True" Height="26"  TextWrapping="Wrap" VerticalAlignment="Top" MinWidth="120" MaxWidth="400" Text="{Binding TcB_CycleTime}"/>
                                <TextBox x:Name="textBox_TcBodeMode" IsReadOnly="True" Height="26"  TextWrapping="Wrap" VerticalAlignment="Top" MinWidth="120" MaxWidth="400" Text="{Binding TcB_Mode}"/>
                                <TextBox x:Name="textBox_TcBodeMeasureTime" IsReadOnly="True" Height="26"  TextWrapping="Wrap" VerticalAlignment="Top" MinWidth="120" MaxWidth="400" Text="{Binding TcB_MeasureTime}"/>
                                <TextBox x:Name="textBox_TcBodeSignalAmplitudePosition" IsReadOnly="True" Height="26"  TextWrapping="Wrap" VerticalAlignment="Top" MinWidth="120" MaxWidth="400" Text="{Binding TcB_SignalAmplitudePosition}"/>
                                <TextBox x:Name="textBox_TcBodeSignalAmplitudeVelocity" IsReadOnly="True" Height="26"  TextWrapping="Wrap" VerticalAlignment="Top" MinWidth="120" MaxWidth="400" Text="{Binding TcB_SignalAmplitudeVelocity}"/>
                                <TextBox x:Name="textBox_TcBodeSignalAmplitudeTorque" IsReadOnly="True" Height="26"  TextWrapping="Wrap" VerticalAlignment="Top" MinWidth="120" MaxWidth="400" Text="{Binding TcB_SignalAmplitudeTorque}"/>
                                <TextBox x:Name="textBox_TcBodeBaseAmplitude" IsReadOnly="True" Height="26"  TextWrapping="Wrap" VerticalAlignment="Top" MinWidth="120" MaxWidth="400" Text="{Binding TcB_BaseAmplitude}"/>
                                <TextBox x:Name="textBox_TcBodeTorqueOffset" IsReadOnly="True" Height="26"  TextWrapping="Wrap" VerticalAlignment="Top" MinWidth="120" MaxWidth="400" Text="{Binding TcB_TorqueOffset}"/>
                                <TextBox x:Name="textBox_TcBodeBaseFrequency" IsReadOnly="True" Height="26"  TextWrapping="Wrap" VerticalAlignment="Top" MinWidth="120" MaxWidth="400" Text="{Binding TcB_BaseFrequency}"/>
                                <TextBox x:Name="textBox_TcBodeDeadTime" IsReadOnly="True" Height="26"  TextWrapping="Wrap" VerticalAlignment="Top" MinWidth="120" MaxWidth="400" Text="{Binding TcB_DeadTime}"/>
                                <TextBox x:Name="textBox_TcBodeProportionalGain" IsReadOnly="True" Height="26"  TextWrapping="Wrap" VerticalAlignment="Top" MinWidth="120" MaxWidth="400" Text="{Binding TcB_ProportionalGain}"/>
                                <TextBox x:Name="textBox_TcBodeIntegralTime" IsReadOnly="True" Height="26"  TextWrapping="Wrap" VerticalAlignment="Top" MinWidth="120" MaxWidth="400" Text="{Binding TcB_IntegralTime}"/>
                                <TextBox x:Name="textBox_TcBodeMinFrequency" IsReadOnly="True" Height="26"  TextWrapping="Wrap" VerticalAlignment="Top" MinWidth="120" MaxWidth="400" Text="{Binding TcB_MinFrequency}"/>
                                <TextBox x:Name="textBox_TcBodeMaxFrequency" IsReadOnly="True" Height="26"  TextWrapping="Wrap" VerticalAlignment="Top" MinWidth="120" MaxWidth="400" Text="{Binding TcB_MaxFrequency}"/>
                                <TextBox x:Name="textBox_TcBodeFrequencySteps" IsReadOnly="True" Height="26"  TextWrapping="Wrap" VerticalAlignment="Top" MinWidth="120" MaxWidth="400" Text="{Binding TcB_FrequencySteps}"/>
                            </StackPanel>
                        </StackPanel>
                    </StackPanel>
                </ScrollViewer>
            </Grid>

            <Grid Name="PropertiesAsymptote" Grid.Column="4" Visibility="Hidden" >
                <ScrollViewer ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
                    <StackPanel Margin="5">
                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Top">
                            <StackPanel HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Label Content="Slope:" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"></Label>
                                <Label Content="Color:" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"></Label>                                
                            </StackPanel>

                            <StackPanel VerticalAlignment="Top">
                                <TextBox x:Name="textBox_SlopeOfDecade" Height="26"  TextWrapping="Wrap" PreviewTextInput="NumberDoubleValidationTextBox" VerticalAlignment="Top" MinWidth="120" MaxWidth="400" IsReadOnly="True">
                                    <TextBox.Text>
                                        <Binding Source="{StaticResource AsymptoteProp}" Path="Slope" >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </TextBox.Text>
                                </TextBox>
                                <ComboBox x:Name="comboBox_AsymptoteColor"  VerticalAlignment="Top" HorizontalAlignment="Left" Height="26" Width="134" >
                                    <ComboBoxItem Content="Dark red"/>
                                    <ComboBoxItem Content="Dark blue"/>
                                    <ComboBoxItem Content="Dark green"/>
                                    <ComboBoxItem Content="Dark orange"/>
                                    <ComboBoxItem Content="Dark magenta"/>
                                    <ComboBoxItem Content="Dark goldenrod"/>
                                    <ComboBoxItem Content="Red"/>
                                    <ComboBoxItem Content="Medium sea green"/>
                                    <ComboBoxItem Content="Violet"/>
                                    <ComboBoxItem Content="Blue"/>
                                    <ComboBoxItem Content="Aqua"/>
                                    <ComboBoxItem Content="Light green"/>
                                    <ComboBoxItem Content="Yellow"/>
                                    <ComboBoxItem Content="Cadet blue"/>
                                    <ComboBoxItem Content="Medium violet red"/>
                                    <ComboBox.SelectedIndex>
                                        <Binding Source="{StaticResource AsymptoteProp}" Path="Color"  >
                                            <Binding.ValidationRules>
                                                <ExceptionValidationRule/>
                                            </Binding.ValidationRules>
                                        </Binding>
                                    </ComboBox.SelectedIndex>
                                </ComboBox>
                                <Button x:Name="button_EditAsymptote" Content="Edit" HorizontalAlignment="Left" VerticalAlignment="Top" Width="100" RenderTransformOrigin="-0.836,0.241" Height="30" Click="button_EditAsymptote_Click" />
                            </StackPanel>

                            <StackPanel HorizontalAlignment="Left" VerticalAlignment="Top">
                                <Label Content="[dB/decade]" HorizontalAlignment="Left"  VerticalAlignment="Top" Height="26"></Label>
                            </StackPanel>
                        </StackPanel>
                    </StackPanel>
                </ScrollViewer>
            </Grid>

        </Grid>

        <Grid Grid.Row="2" Name="StatusGrid" Background="LightSteelBlue">
            <StatusBar Name="StatusBarApp"  HorizontalAlignment="Left" Width="289" Background="{x:Null}" >
                <StatusBarItem>
                    <TextBlock x:Name="lblStatus" />
                </StatusBarItem>
            </StatusBar>
            <Label Content="Time to finish:" HorizontalAlignment="Right" Margin="0,0,48,0.2" VerticalAlignment="Top" />
            <Label x:Name="label_TimeToFinish" Content="0:00:01" HorizontalAlignment="Right"  Height="27" VerticalAlignment="Top"/>
            <ProgressBar x:Name="ProcProgressBar" Height="25" Margin="300,5,138,0" VerticalAlignment="Top" Visibility="Hidden" />
        </Grid>

    </Grid>



</Window>
