AITScDoubleRow.xaml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <UserControl x:Class="Aitex.Sorter.UI.Controls.AITScDoubleRow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:converter="clr-namespace:Aitex.Sorter.UI.Converter"
  7. mc:Ignorable="d"
  8. x:Name="self"
  9. d:DesignHeight="40" d:DesignWidth="480">
  10. <UserControl.Resources>
  11. <converter:WidthConverter x:Key="widthConverter"/>
  12. </UserControl.Resources>
  13. <Grid>
  14. <Grid.ColumnDefinitions>
  15. <ColumnDefinition Width="{Binding ElementName=self,Path=NameWidth }" />
  16. <ColumnDefinition Width="{Binding ElementName=self,Path=FeedbackWidth }" />
  17. <ColumnDefinition Width="{Binding ElementName=self,Path=SetPointWidth }" />
  18. <ColumnDefinition Width="{Binding ElementName=self,Path=CommandWidth }" />
  19. </Grid.ColumnDefinitions>
  20. <Rectangle Grid.Column="0" Fill="#376092" Margin="0" Stroke="White" StrokeThickness="1"></Rectangle>
  21. <TextBlock Grid.Column="0" FontSize="15" Text="{Binding ElementName=self, Path=ScName }" TextWrapping="Wrap" Foreground="White" />
  22. <Rectangle Grid.Column="1" Fill="#95B3D7" Margin="0" Stroke="White" StrokeThickness="1"></Rectangle>
  23. <TextBlock Grid.Column="1" TextAlignment="Center" FontSize="13" Width="{Binding ElementName=self,Path=FeedbackWidth }" Height="25" Margin="3" Padding="0,5,0,0" Text="{Binding ElementName=self,Path=ScFeedback, StringFormat={}{0:F0}}" />
  24. <Rectangle Grid.Column="2" Fill="#95B3D7" Margin="0" Stroke="White" StrokeThickness="1"></Rectangle>
  25. <TextBox HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Grid.Column="2" PreviewTextInput="OnPreviewTextInput" TextAlignment="Center" FontSize="13" Width="{Binding ElementName=self,Path=SetPointWidth }" Height="25" Margin="3,0,3,0" Padding="0,0,0,0" Text="{Binding ElementName=self,Path=ScSetPoint}" />
  26. <Rectangle Grid.Column="3" Fill="#95B3D7" Margin="0" Stroke="White" StrokeThickness="1"></Rectangle>
  27. <Button Grid.Column="3" Content="Set" HorizontalContentAlignment="Center" VerticalAlignment="Center" FontSize="16" Width="{Binding ElementName=self, Path=CommandWidth,Converter={StaticResource widthConverter}}" Height="30" Margin="5,3,5,3" Click="Button_Click"/>
  28. </Grid>
  29. </UserControl>