DeviceTestCardView.xaml 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <UserControl x:Class="PLCTool.Views.BusinessManageView.DeviceTestCardView"
  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:local="clr-namespace:PLCTool.Views.BusinessManageView"
  7. Height="240" Width="280">
  8. <Grid>
  9. <Grid.InputBindings>
  10. <MouseBinding MouseAction="LeftDoubleClick" Command="{Binding DoubleClickCommand}" CommandParameter="{Binding ElementName=txtName}">
  11. </MouseBinding>
  12. </Grid.InputBindings>
  13. <Grid.RowDefinitions>
  14. <RowDefinition Height="0.6*"/>
  15. <RowDefinition/>
  16. </Grid.RowDefinitions>
  17. <Border BorderBrush="#CBCBCB" Grid.Row="1" BorderThickness="1"/>
  18. <Grid Grid.Row="0" Background="#409EFF" >
  19. <TextBlock x:Name="txtName" Text="{Binding ProjectName}" Foreground="White" FontSize="30" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  20. </Grid>
  21. <Grid Grid.Row="1">
  22. <Grid.ColumnDefinitions>
  23. <ColumnDefinition Width="2*"/>
  24. <ColumnDefinition Width="3*"/>
  25. </Grid.ColumnDefinitions>
  26. <Grid.RowDefinitions>
  27. <RowDefinition/>
  28. <RowDefinition/>
  29. <RowDefinition/>
  30. <RowDefinition/>
  31. </Grid.RowDefinitions>
  32. <Grid.Resources>
  33. <Style TargetType="Label">
  34. <Setter Property="FontSize" Value="20"/>
  35. <Setter Property="Width" Value="auto"/>
  36. <Setter Property="HorizontalAlignment" Value="Right"/>
  37. <Setter Property="VerticalAlignment" Value="Center"/>
  38. <Setter Property="Margin" Value="10 0 0 0"/>
  39. </Style>
  40. </Grid.Resources>
  41. <TextBlock Margin="0,10,0,0" Style="{StaticResource NormalTextBlockStyle}" Grid.Row="0" Text="项目代号:" TextAlignment="Right"/>
  42. <TextBlock Margin="0,10,0,0" Style="{StaticResource NormalTextBlockStyle}" Grid.Row="1" Text="负责人:" TextAlignment="Right"/>
  43. <TextBlock Margin="0,10,0,0" Style="{StaticResource NormalTextBlockStyle}" Grid.Row="2" Text="设备数量:" TextAlignment="Right"/>
  44. <TextBlock Margin="0,10,0,0" Style="{StaticResource NormalTextBlockStyle}" Grid.Row="3" Text="待测设备数量:" TextAlignment="Right"/>
  45. <TextBlock Margin="0,10,0,0" Style="{StaticResource NormalTextBlockStyle}" x:Name="txtProjectNo" Grid.Row="0" Grid.Column="1" />
  46. <TextBlock Margin="0,10,0,0" Style="{StaticResource NormalTextBlockStyle}" x:Name="txtPProjectLeader" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left"/>
  47. <TextBlock Margin="0,10,0,0" Style="{StaticResource NormalTextBlockStyle}" x:Name="txtDeviceCount" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Left"/>
  48. <TextBlock Margin="0,10,0,0" Style="{StaticResource NormalTextBlockStyle}" x:Name="txtNoTestCount" Grid.Row="3" Grid.Column="1" HorizontalAlignment="Left"/>
  49. </Grid>
  50. </Grid>
  51. </UserControl>