<UserControl x:Class="MECF.Framework.UI.Core.CommonControl.AITScDoubleRow"
             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" 
             mc:Ignorable="d" 
             x:Name="self"
             d:DesignHeight="30" d:DesignWidth="450">
    
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="{Binding ElementName=self,Path=NameWidth }" />
            <ColumnDefinition Width="{Binding ElementName=self,Path=FeedbackWidth }" />
            <ColumnDefinition Width="{Binding ElementName=self,Path=SetPointWidth }" />
            <ColumnDefinition Width="{Binding ElementName=self,Path=CommandWidth }" />
        </Grid.ColumnDefinitions>

        <Rectangle   Grid.Column="0" Fill="#376092" Margin="0" Stroke="White" StrokeThickness="1"></Rectangle>
        <TextBlock  Grid.Column="0" FontSize="15" Text="{Binding ElementName=self, Path=ScName }" Foreground="White" />

        <Rectangle  Grid.Column="1" Fill="#95B3D7" Margin="0" Stroke="White" StrokeThickness="1"></Rectangle>
        <TextBlock  Grid.Column="1" TextAlignment="Center" FontSize="20" Width="{Binding ElementName=self,Path=FeedbackWidth }" Height="25" Margin="3" Padding="0,0,0,0" Text="{Binding ElementName=self,Path=ScFeedback, StringFormat={}{0:F0}}" />

        <Rectangle  Grid.Column="2" Fill="#95B3D7" x:Name="RectangleSetPoint" Margin="0" Stroke="White" StrokeThickness="1"></Rectangle>
        <TextBox   Grid.Column="2"  PreviewTextInput="OnPreviewTextInput"  x:Name="InputSetPoint" TextAlignment="Center" FontSize="20" Width="{Binding ElementName=self,Path=SetPointWidth }" Height="25" Margin="3,3,0,0" Padding="0,0,0,0" Text="{Binding ElementName=self,Path=ScSetPoint}" />
        
        <Rectangle  Grid.Column="3" Fill="#95B3D7" Margin="0" Stroke="White" StrokeThickness="1"></Rectangle>
        <Button  Grid.Column="3" Content="Set" VerticalAlignment="Center" FontSize="16"  Width="{Binding ElementName=self, Path=CommandWidth}"  Height="26" Margin="2" Click="Button_Click"/>

</Grid>
</UserControl>
