终端一体化运控平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

400 regels
27 KiB

  1. <Window
  2. x:Class="BPASmartClient.JXJFoodBigStation.View.RecipeInfosView"
  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:local="clr-namespace:BPASmartClient.JXJFoodBigStation.View"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:vm="clr-namespace:BPASmartClient.JXJFoodBigStation.ViewModel"
  9. Title="RecipeInfosView"
  10. Width="800"
  11. Height="620"
  12. AllowsTransparency="True"
  13. Background="{x:Null}"
  14. Topmost="True"
  15. WindowStartupLocation="CenterScreen"
  16. WindowStyle="None"
  17. mc:Ignorable="d">
  18. <Window.DataContext>
  19. <vm:RecipeInfosViewModel />
  20. </Window.DataContext>
  21. <Window.Resources>
  22. <ResourceDictionary>
  23. <ResourceDictionary.MergedDictionaries>
  24. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
  25. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
  26. <ResourceDictionary>
  27. <!--#region ListBox样式-->
  28. <!--<Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
  29. <Setter Property="OverridesDefaultStyle" Value="True" />
  30. <Setter Property="SnapsToDevicePixels" Value="True" />
  31. <Setter Property="BorderBrush" Value="{x:Null}" />
  32. <Setter Property="Foreground" Value="White" />
  33. <Setter Property="FontSize" Value="20" />
  34. <Setter Property="HorizontalContentAlignment" Value="Center" />
  35. <Setter Property="VerticalContentAlignment" Value="Center" />
  36. <Setter Property="Template">
  37. <Setter.Value>
  38. <ControlTemplate TargetType="{x:Type ListBoxItem}">
  39. <Border x:Name="border" CornerRadius="8">
  40. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
  41. </Border>
  42. </ControlTemplate>
  43. </Setter.Value>
  44. </Setter>
  45. </Style>-->
  46. <!--#endregion-->
  47. </ResourceDictionary>
  48. </ResourceDictionary.MergedDictionaries>
  49. </ResourceDictionary>
  50. </Window.Resources>
  51. <!--<Border Name="br" BorderThickness="1" >
  52. <Border.Background>
  53. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/bg.png" />
  54. </Border.Background>
  55. <Grid>
  56. <Grid.RowDefinitions>
  57. <RowDefinition />
  58. </Grid.RowDefinitions>
  59. <Grid Grid.Row="1">
  60. <Grid.RowDefinitions>
  61. <RowDefinition Height="30" />
  62. <RowDefinition Height="30" />
  63. <RowDefinition Height="30" />
  64. <RowDefinition />
  65. <RowDefinition Height="40" />
  66. </Grid.RowDefinitions>
  67. <WrapPanel>
  68. <TextBlock Margin="10,0,0,0" Background="Transparent" FontSize="20" Foreground="#FF2AB2E7" Text="配方名称:" />
  69. <TextBlock Margin="10,0,0,0" Background="Transparent" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding RecipeName}" />
  70. </WrapPanel>
  71. <WrapPanel Grid.Row="1">
  72. <TextBlock Margin="10,0,0,0" Background="Transparent" FontSize="20" Foreground="#FF2AB2E7" Text="配方编号:" />
  73. <TextBlock Grid.Row="1" Margin="10,0,0,0" Background="Transparent" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding RecipeCode}" />
  74. </WrapPanel>
  75. <WrapPanel Grid.Row="2">
  76. <TextBlock Margin="10,0,0,0" Background="Transparent" FontSize="20" Foreground="#FF2AB2E7" Text="托盘编号:" />
  77. <TextBlock Grid.Row="1" Margin="10,0,0,0" Background="Transparent" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding TrayCode}" />
  78. </WrapPanel>
  79. <Grid Grid.Row="3">
  80. <Grid.RowDefinitions>
  81. <RowDefinition></RowDefinition>
  82. </Grid.RowDefinitions>
  83. <Grid.ColumnDefinitions>
  84. <ColumnDefinition Width="2*"/>
  85. <ColumnDefinition Width="9*"/>
  86. </Grid.ColumnDefinitions>
  87. <TextBlock Grid.Row="0" HorizontalAlignment="Center">大料站</TextBlock>
  88. <Grid Grid.Column="1">
  89. <Grid.RowDefinitions>
  90. <RowDefinition Height="20"></RowDefinition>
  91. <RowDefinition Height="9*"></RowDefinition>
  92. </Grid.RowDefinitions>
  93. <Grid Grid.Row="0" >
  94. <Grid.ColumnDefinitions>
  95. <ColumnDefinition Width="2*"/>
  96. <ColumnDefinition Width="2*"/>
  97. <ColumnDefinition Width="2*"/>
  98. </Grid.ColumnDefinitions>
  99. <TextBlock FontSize="16" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Top">原料桶号</TextBlock>
  100. <TextBlock FontSize="16" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Top">原料位置</TextBlock>
  101. <TextBlock FontSize="16" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Top">原料重量</TextBlock>
  102. </Grid>
  103. <ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Auto" >
  104. <ItemsControl ItemsSource="{Binding RawMaterialsInfo}" >
  105. <ItemsControl.ItemTemplate>
  106. <DataTemplate>
  107. <Grid x:Name="grb" Height="25" >
  108. <Grid.ColumnDefinitions>
  109. <ColumnDefinition Width="2*"/>
  110. <ColumnDefinition Width="2*"/>
  111. <ColumnDefinition Width="2*"/>
  112. </Grid.ColumnDefinitions>
  113. <TextBlock Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding RawMaterialBarrelNum}"></TextBlock>
  114. <TextBlock Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding RawMaterialLocation}"></TextBlock>
  115. <TextBlock Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="20" Foreground="#FF2AB2E7" Text="{Binding RawMaterialWeight}"></TextBlock>
  116. </Grid>
  117. <DataTemplate.Triggers>
  118. <Trigger Property="IsMouseOver" Value="true">
  119. <Setter TargetName="grb" Property="Background" Value="#112AB2E7" />
  120. </Trigger>
  121. </DataTemplate.Triggers>
  122. </DataTemplate>
  123. </ItemsControl.ItemTemplate>
  124. </ItemsControl>
  125. </ScrollViewer>
  126. </Grid>
  127. </Grid>
  128. <Grid Grid.Row="4">
  129. <Button Command="{Binding ReturnPage}" Width="200" >返回</Button>
  130. </Grid>
  131. </Grid>
  132. </Grid>
  133. </Border>-->
  134. <!--<Border Name="br">
  135. <Border.Background>
  136. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/bg.png" />
  137. </Border.Background>
  138. <Grid >
  139. <Grid.RowDefinitions>
  140. <RowDefinition Height="50"></RowDefinition>
  141. <RowDefinition Height="88"></RowDefinition>
  142. <RowDefinition Height="40"></RowDefinition>
  143. <RowDefinition></RowDefinition>
  144. </Grid.RowDefinitions>
  145. <TextBlock Text="大料站配方信息" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FF2AB2E7" FontSize="22" Margin="0,10"></TextBlock>
  146. <UniformGrid Grid.Row="1" Columns="2" Margin="0,0,0,8">
  147. <StackPanel Orientation="Vertical" Margin="0,0,-13,0">
  148. <StackPanel Orientation="Horizontal" Margin="0,8">
  149. <TextBlock Text="请输入配方名称:" Foreground="#FF2AB2E7" FontSize="16" Margin="5,0,5,0" VerticalAlignment="Center"></TextBlock>
  150. <TextBox Text="{Binding RecipeName}" Width="150" Height="30" BorderThickness="1" Background="Transparent" Foreground="Orange"
  151. VerticalContentAlignment="Center"
  152. BorderBrush="#FF2AB2E7" VerticalAlignment="Center" FontSize="16" ></TextBox>
  153. </StackPanel>
  154. <StackPanel Orientation="Horizontal">
  155. <TextBlock Text="请输入托盘编号:" Foreground="#FF2AB2E7" FontSize="16" Margin="5,0,5,0" VerticalAlignment="Center"></TextBlock>
  156. <TextBox Text="{Binding TrayCode}" InputMethod.IsInputMethodEnabled="False" Width="150" Height="30" BorderThickness="1" Background="Transparent" Foreground="Orange"
  157. VerticalContentAlignment="Center"
  158. BorderBrush="#FF2AB2E7" VerticalAlignment="Center" FontSize="16" ></TextBox>
  159. </StackPanel>
  160. </StackPanel>
  161. <Grid Width="260" HorizontalAlignment="Right">
  162. <Grid.RowDefinitions>
  163. <RowDefinition/>
  164. <RowDefinition/>
  165. </Grid.RowDefinitions>
  166. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,5,5,0">
  167. <Button Content="添加原料" Width="120" Margin="0,0,10,0" Height="30" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Cursor="Hand" Command="{Binding AddRecipe}" ></Button>
  168. <Button Content="确认更新" Height="30" Width="120" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Command="{Binding Comfirm}"></Button>
  169. </StackPanel>
  170. <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Right" Margin="0,3,5,0">
  171. <Button Content="另存为" Height="30" Width="120" Margin="0,0,10,0" Command="{Binding SaveAs}" Cursor="Hand"/>
  172. <Button Click="Button_Click" Content="取消" Height="30" FontSize="20" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Width="120" Cursor="Hand"></Button>
  173. </StackPanel>
  174. </Grid>
  175. </UniformGrid>
  176. <Grid Grid.Row="2" Background="#FF2AB2E7" Margin="0,0,0,10">
  177. <Grid.ColumnDefinitions>
  178. <ColumnDefinition Width="130"/>
  179. <ColumnDefinition Width="145"/>
  180. <ColumnDefinition Width="145"/>
  181. <ColumnDefinition/>
  182. </Grid.ColumnDefinitions>
  183. <TextBlock Text="原料桶号" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontSize="14"/>
  184. <GridSplitter></GridSplitter>
  185. <TextBlock Grid.Column="1" Text="原料位置" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" FontSize="14"/>
  186. <GridSplitter Grid.Column="1"></GridSplitter>
  187. <TextBlock Grid.Column="2" Text="原料重量" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White" FontSize="14"></TextBlock>
  188. <GridSplitter Grid.Column="2"></GridSplitter>
  189. <TextBlock Grid.Column="3" Text="操作" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White" FontSize="14"/>
  190. </Grid>
  191. <ScrollViewer Grid.Row="3" VerticalScrollBarVisibility="Hidden">
  192. <ItemsControl ItemsSource="{Binding RawMaterialsInfo}">
  193. <ItemsControl.ItemsPanel>
  194. <ItemsPanelTemplate>
  195. <StackPanel></StackPanel>
  196. </ItemsPanelTemplate>
  197. </ItemsControl.ItemsPanel>
  198. <ItemsControl.ItemTemplate>
  199. <DataTemplate>
  200. <RadioButton>
  201. <RadioButton.Template>
  202. <ControlTemplate>
  203. <Grid>
  204. <Grid.ColumnDefinitions>
  205. <ColumnDefinition Width="130"/>
  206. <ColumnDefinition Width="145"></ColumnDefinition>
  207. <ColumnDefinition Width="145"></ColumnDefinition>
  208. <ColumnDefinition></ColumnDefinition>
  209. </Grid.ColumnDefinitions>
  210. <ComboBox ItemsSource="{Binding DataContext.materialNames,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}" Text="{Binding RawMaterialBarrelNum}" Margin="5,0,0,5" Width="120" FontSize="14" KeyUp="ComboBox_KeyUp" LostFocus="ComboBox_LostFocus" >
  211. <ComboBox.ItemContainerStyle>
  212. <Style TargetType="{x:Type ComboBoxItem}">
  213. <Setter Property="Background" Value="White" />
  214. <Setter Property="Foreground" Value="#e69519"/>
  215. </Style>
  216. </ComboBox.ItemContainerStyle>
  217. </ComboBox>
  218. <StackPanel Grid.Column="1" Orientation="Horizontal" >
  219. <TextBox Text="{Binding RawMaterialLocation}" Background="Transparent" FontSize="14"
  220. BorderBrush="#e69519" Foreground="LightGray" Width="135" Margin="5,0,0,5" ></TextBox>
  221. </StackPanel>
  222. <StackPanel Orientation="Horizontal" Grid.Column="2">
  223. <TextBox Text="{Binding RawMaterialWeight}" Background="Transparent" FontSize="14"
  224. BorderBrush="#e69519" Foreground="LightGray" Width="125" Margin="5,0,0,5" ></TextBox>
  225. <TextBlock VerticalAlignment="Center" Margin="4,0,0,5" Text="g" Foreground="#e69519" ></TextBlock>
  226. </StackPanel>
  227. <Button Grid.Column="3"
  228. Content="删除"
  229. Width="94"
  230. FontSize="14"
  231. Margin="10,0,20,5"
  232. Background="Transparent"
  233. BorderBrush="#e69519" Foreground="LightGray" HorizontalAlignment="Right"
  234. Command="{Binding DataContext.RemoveRecipe,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}"
  235. CommandParameter="{Binding MaterialCode}"></Button>
  236. </Grid>
  237. </ControlTemplate>
  238. </RadioButton.Template>
  239. </RadioButton>
  240. </DataTemplate>
  241. </ItemsControl.ItemTemplate>
  242. </ItemsControl>
  243. </ScrollViewer>
  244. </Grid>
  245. </Border>-->
  246. <Border Name="br" BorderThickness="2" BorderBrush="#0CADF5">
  247. <Border.Background>
  248. <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/bg.png" />
  249. </Border.Background>
  250. <Grid >
  251. <Grid.RowDefinitions>
  252. <RowDefinition Height="50"></RowDefinition>
  253. <RowDefinition Height="85"></RowDefinition>
  254. <RowDefinition Height="40"></RowDefinition>
  255. <RowDefinition></RowDefinition>
  256. </Grid.RowDefinitions>
  257. <TextBlock Text="大配料站配方信息" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#FF2AB2E7" FontSize="25" Margin="0,10"></TextBlock>
  258. <UniformGrid Grid.Row="1" Columns="2" Margin="0,0,0,5">
  259. <StackPanel Orientation="Vertical" >
  260. <StackPanel Orientation="Horizontal" Margin="0,8">
  261. <TextBlock Text="请输入配方名称:" Foreground="#FF2AB2E7" FontSize="18" Margin="10,0,5,0" VerticalAlignment="Center"></TextBlock>
  262. <TextBox Text="{Binding RecipeName}" Width="230" Height="30" BorderThickness="1" Background="Transparent" Foreground="Orange"
  263. VerticalContentAlignment="Center"
  264. BorderBrush="#FF2AB2E7" VerticalAlignment="Center" FontSize="16" ></TextBox>
  265. </StackPanel>
  266. <StackPanel Orientation="Horizontal">
  267. <TextBlock Text="请输入托盘编号:" Foreground="#FF2AB2E7" FontSize="18" Margin="10,0,5,0" VerticalAlignment="Center"></TextBlock>
  268. <TextBox Text="{Binding TrayCode}" InputMethod.IsInputMethodEnabled="False" Width="230" Height="30" BorderThickness="1" Background="Transparent" Foreground="Orange"
  269. VerticalContentAlignment="Center"
  270. BorderBrush="#FF2AB2E7" VerticalAlignment="Center" FontSize="16" ></TextBox>
  271. </StackPanel>
  272. </StackPanel>
  273. <Grid>
  274. <Grid.RowDefinitions>
  275. <RowDefinition/>
  276. <RowDefinition/>
  277. </Grid.RowDefinitions>
  278. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,4,0,0">
  279. <Button Content="添加原料" Width="180" Margin="0,0,10,0" Height="30" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Cursor="Hand" Command="{Binding AddRecipe}" ></Button>
  280. <Button Content="清除原料" Height="30" Width="180" Margin="0,0,10,0" Command="{Binding ClearRawMaterial}" Cursor="Hand"/>
  281. </StackPanel>
  282. <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="0,4,0,0" HorizontalAlignment="Center">
  283. <Button Content="确认" Margin="0,0,10,0" Height="30" Width="180" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Command="{Binding Comfirm}"></Button>
  284. <Button Click="Button_Click" Content="取消" Margin="0,0,10,0" Height="30" FontSize="20" Background="Transparent" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Width="180" Cursor="Hand"></Button>
  285. </StackPanel>
  286. </Grid>
  287. </UniformGrid>
  288. <Grid Grid.Row="2" Background="#FF2AB2E7" Margin="0,0,0,10">
  289. <Grid.ColumnDefinitions>
  290. <ColumnDefinition/>
  291. <ColumnDefinition/>
  292. <ColumnDefinition/>
  293. <ColumnDefinition/>
  294. <ColumnDefinition Width="120"/>
  295. </Grid.ColumnDefinitions>
  296. <TextBlock Grid.Column="0" Text="原料名称" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"/>
  297. <GridSplitter></GridSplitter>
  298. <TextBlock Grid.Column="1" Text="原料位置" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"/>
  299. <GridSplitter Grid.Column="1"></GridSplitter>
  300. <TextBlock Grid.Column="2" Text="托盘桶号" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"/>
  301. <GridSplitter Grid.Column="2"></GridSplitter>
  302. <TextBlock Grid.Column="3" Text="原料重量" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"></TextBlock>
  303. <GridSplitter Grid.Column="3"></GridSplitter>
  304. <TextBlock Grid.Column="4" Text="操作" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"/>
  305. </Grid>
  306. <ScrollViewer Grid.Row="3" VerticalScrollBarVisibility="Hidden">
  307. <ItemsControl ItemsSource="{Binding RawMaterialsInfo}">
  308. <ItemsControl.ItemsPanel>
  309. <ItemsPanelTemplate>
  310. <StackPanel></StackPanel>
  311. </ItemsPanelTemplate>
  312. </ItemsControl.ItemsPanel>
  313. <ItemsControl.ItemTemplate>
  314. <DataTemplate>
  315. <RadioButton>
  316. <RadioButton.Template>
  317. <ControlTemplate>
  318. <Grid>
  319. <Grid.ColumnDefinitions>
  320. <ColumnDefinition/>
  321. <ColumnDefinition></ColumnDefinition>
  322. <ColumnDefinition></ColumnDefinition>
  323. <ColumnDefinition></ColumnDefinition>
  324. <ColumnDefinition Width="120"></ColumnDefinition>
  325. </Grid.ColumnDefinitions>
  326. <!--<ComboBox ItemsSource="{Binding DataContext.materialNames,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}" Text="{Binding RawMaterialLocation}" Margin="10,0,0,10" Width="190" FontSize="14" KeyUp="ComboBox_KeyUp" LostFocus="ComboBox_LostFocus">
  327. <ComboBox.ItemContainerStyle>
  328. <Style TargetType="{x:Type ComboBoxItem}">
  329. <Setter Property="Background" Value="White" />
  330. <Setter Property="Foreground" Value="#e69519"/>
  331. </Style>
  332. </ComboBox.ItemContainerStyle>-->
  333. <!--</ComboBox>-->
  334. <ComboBox
  335. Margin="3"
  336. VerticalAlignment="Center"
  337. BorderBrush="#FF074B92"
  338. BorderThickness="1"
  339. FontFamily="楷体"
  340. FontSize="14"
  341. Foreground="LightGray"
  342. IsEditable="False"
  343. ItemsSource="{Binding DataContext.RawMaterialNames, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
  344. SelectedIndex="{Binding RawMaterialCount}"
  345. MouseLeave="ComboBox_MouseLeave"
  346. Style="{StaticResource ComboBoxStyle}"
  347. Text="{Binding RawMaterialName}"/>
  348. <StackPanel
  349. VerticalAlignment="Center" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Center" >
  350. <TextBlock Grid.Column="1" Text="{Binding RawMaterialLocation}" Background="Transparent" FontSize="14" Foreground="LightGray" ></TextBlock>
  351. </StackPanel>
  352. <!--<TextBox Text="{Binding RawMaterialName}" Background="Transparent" FontSize="14"
  353. BorderBrush="#e69519" Foreground="LightGray" Width="190" Margin="10,0,0,10" ></TextBox>-->
  354. <StackPanel
  355. Margin="3" Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Center">
  356. <TextBox Text="{Binding RawMaterialBarrelNum}" Background="Transparent" FontSize="14"
  357. BorderBrush="#e69519" Foreground="LightGray" Width="120" ></TextBox>
  358. </StackPanel>
  359. <StackPanel
  360. Margin="3" Orientation="Horizontal" Grid.Column="3" HorizontalAlignment="Center">
  361. <TextBox Text="{Binding RawMaterialWeight}" Background="Transparent" FontSize="14"
  362. BorderBrush="#e69519" Foreground="LightGray" Width="120" ></TextBox>
  363. <TextBlock FontSize="14" VerticalAlignment="Center" Margin="4,0,0,0" Text="Kg" Foreground="#e69519" ></TextBlock>
  364. </StackPanel>
  365. <Button Grid.Column="4"
  366. Content="删除"
  367. Width="94"
  368. FontSize="14"
  369. Background="Transparent"
  370. BorderBrush="#e69519" Foreground="LightGray" HorizontalAlignment="Center"
  371. Command="{Binding DataContext.RemoveRecipe,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}"
  372. CommandParameter="{Binding RawMaterialCount}"></Button>
  373. </Grid>
  374. </ControlTemplate>
  375. </RadioButton.Template>
  376. </RadioButton>
  377. </DataTemplate>
  378. </ItemsControl.ItemTemplate>
  379. </ItemsControl>
  380. </ScrollViewer>
  381. </Grid>
  382. </Border>
  383. </Window>