终端一体化运控平台
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

StockBinRawMaterialView.xaml 7.0 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <UserControl
  2. x:Class="BPASmartClient.FoodStationTest.View.StockBinRawMaterialView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  8. xmlns:vm="clr-namespace:BPASmartClient.FoodStationTest.ViewModel"
  9. d:DesignHeight="1080"
  10. d:DesignWidth="1920"
  11. mc:Ignorable="d">
  12. <UserControl.DataContext>
  13. <vm:StockBinRawMaterialViewModel />
  14. </UserControl.DataContext>
  15. <UserControl.Resources>
  16. <ResourceDictionary>
  17. <ResourceDictionary.MergedDictionaries>
  18. <ResourceDictionary Source="/BPASmartClient.FoodStationTest;component/Resource/MyStyle.xaml" />
  19. </ResourceDictionary.MergedDictionaries>
  20. </ResourceDictionary>
  21. </UserControl.Resources>
  22. <Grid Margin="10">
  23. <Grid.RowDefinitions>
  24. <RowDefinition Height="60" />
  25. <RowDefinition Height="50" />
  26. <RowDefinition />
  27. </Grid.RowDefinitions>
  28. <!--#region 表格标题栏设置-->
  29. <Grid>
  30. <StackPanel
  31. HorizontalAlignment="Right"
  32. VerticalAlignment="Center"
  33. Orientation="Horizontal">
  34. <Button
  35. Width="150"
  36. Height="50"
  37. Margin="5"
  38. Command="{Binding UpdateRawMaterial}"
  39. Content="新增数据"
  40. FontSize="28"
  41. Foreground="DeepSkyBlue"
  42. Style="{StaticResource ImageButtonStyle}" />
  43. <Button
  44. Width="150"
  45. Height="50"
  46. Margin="5"
  47. Command="{Binding SaveRawMaterialPara}"
  48. Content="保存参数"
  49. FontSize="28"
  50. Foreground="DeepSkyBlue"
  51. Style="{StaticResource ImageButtonStyle}" />
  52. </StackPanel>
  53. </Grid>
  54. <Grid
  55. Grid.Row="1"
  56. Margin="0,10,0,0"
  57. Background="#ff0C255F">
  58. <Grid.ColumnDefinitions>
  59. <ColumnDefinition />
  60. <ColumnDefinition />
  61. <ColumnDefinition />
  62. <ColumnDefinition />
  63. </Grid.ColumnDefinitions>
  64. <TextBlock
  65. Grid.Column="0"
  66. FontSize="24"
  67. Style="{StaticResource TitleTextblockStyle}"
  68. Text="序号" />
  69. <TextBlock
  70. Grid.Column="1"
  71. FontSize="24"
  72. Style="{StaticResource TitleTextblockStyle}"
  73. Text="料仓位置" />
  74. <TextBlock
  75. Grid.Column="2"
  76. FontSize="24"
  77. Style="{StaticResource TitleTextblockStyle}"
  78. Text="原料编号" />
  79. <TextBlock
  80. Grid.Column="3"
  81. FontSize="24"
  82. Style="{StaticResource TitleTextblockStyle}"
  83. Text="编辑" />
  84. <Border
  85. Grid.Column="0"
  86. Grid.ColumnSpan="4"
  87. BorderBrush="{StaticResource bordColor}"
  88. BorderThickness="1,1,1,1" />
  89. <Border
  90. Grid.Column="1"
  91. BorderBrush="{StaticResource bordColor}"
  92. BorderThickness="1,0,1,0" />
  93. <Border
  94. Grid.Column="3"
  95. BorderBrush="{StaticResource bordColor}"
  96. BorderThickness="1,0,1,0" />
  97. </Grid>
  98. <Grid Grid.Row="2">
  99. <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
  100. <ItemsControl Foreground="DeepSkyBlue" ItemsSource="{Binding RawMaterialInfo}">
  101. <ItemsControl.ItemTemplate>
  102. <DataTemplate>
  103. <Grid Name="gr">
  104. <Grid.ColumnDefinitions>
  105. <ColumnDefinition />
  106. <ColumnDefinition />
  107. <ColumnDefinition />
  108. <ColumnDefinition />
  109. </Grid.ColumnDefinitions>
  110. <TextBlock
  111. Grid.Column="0"
  112. HorizontalAlignment="Center"
  113. VerticalAlignment="Center"
  114. FontSize="16"
  115. Text="{Binding RawMaterialCount}" />
  116. <TextBox
  117. Grid.Column="1"
  118. Style="{StaticResource InputTextboxStyle}"
  119. Text="{Binding RawMaterialLocation}" />
  120. <TextBox
  121. Grid.Column="2"
  122. Style="{StaticResource InputTextboxStyle}"
  123. Text="{Binding RawMaterialName}" />
  124. <Button
  125. Grid.Column="3"
  126. Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  127. CommandParameter="{Binding RawMaterialLocation}"
  128. Content="删除"
  129. FontSize="16"
  130. Style="{StaticResource ControlButtonStyle}" />
  131. <Border
  132. Grid.Column="0"
  133. Grid.ColumnSpan="4"
  134. BorderBrush="{StaticResource bordColor}"
  135. BorderThickness="1,0,1,1" />
  136. <Border
  137. Grid.Column="1"
  138. BorderBrush="{StaticResource bordColor}"
  139. BorderThickness="1,0,1,0" />
  140. <Border
  141. Grid.Column="3"
  142. BorderBrush="{StaticResource bordColor}"
  143. BorderThickness="1,0,1,0" />
  144. </Grid>
  145. <DataTemplate.Triggers>
  146. <Trigger Property="IsMouseOver" Value="true">
  147. <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
  148. </Trigger>
  149. </DataTemplate.Triggers>
  150. </DataTemplate>
  151. </ItemsControl.ItemTemplate>
  152. </ItemsControl>
  153. </ScrollViewer>
  154. </Grid>
  155. </Grid>
  156. </UserControl>