终端一体化运控平台
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.
 
 
 

123 regels
6.0 KiB

  1. <UserControl x:Class="FryPot_DosingSystem.View.RecipesSendDown"
  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:FryPot_DosingSystem.View"
  7. xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  8. xmlns:vm="clr-namespace:FryPot_DosingSystem.ViewModel"
  9. mc:Ignorable="d"
  10. d:DesignHeight="450" d:DesignWidth="800">
  11. <UserControl.DataContext>
  12. <vm:RecipeSetDownViewModel/>
  13. </UserControl.DataContext>
  14. <UserControl.Resources>
  15. <ResourceDictionary>
  16. <ResourceDictionary.MergedDictionaries>
  17. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
  18. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
  19. </ResourceDictionary.MergedDictionaries>
  20. <Style x:Key="UserItemContainerStyle" TargetType="ListBoxItem">
  21. <Style.Resources>
  22. <!-- SelectedItem with focus -->
  23. <SolidColorBrush
  24. x:Key="{x:Static SystemColors.HighlightBrushKey}"
  25. Opacity=".4"
  26. Color="White" />
  27. <!-- SelectedItem without focus -->
  28. <SolidColorBrush
  29. x:Key="{x:Static SystemColors.ControlBrushKey}"
  30. Opacity=".4"
  31. Color="White" />
  32. </Style.Resources>
  33. <!-- 设置触发器 -->
  34. <Style.Triggers>
  35. <Trigger Property="IsMouseOver" Value="true">
  36. <Setter Property="Background" Value="White" />
  37. <Setter Property="Foreground" Value="White" />
  38. </Trigger>
  39. <Trigger Property="IsFocused" Value="true">
  40. <Setter Property="Background" Value="White" />
  41. <Setter Property="Foreground" Value="White" />
  42. </Trigger>
  43. </Style.Triggers>
  44. </Style>
  45. </ResourceDictionary>
  46. </UserControl.Resources>
  47. <Grid>
  48. <Grid.RowDefinitions>
  49. <RowDefinition Height="50"/>
  50. <RowDefinition/>
  51. </Grid.RowDefinitions>
  52. <Button HorizontalAlignment="Right" VerticalAlignment="Center" Content="配方一键下发" Width="110" Height="30" Margin="0,0,10,0" Cursor="Hand" Command="{Binding AllRecipeSetDownCommand}"></Button>
  53. <ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" >
  54. <ListView
  55. Margin="5"
  56. VerticalAlignment="Top"
  57. Background="Transparent"
  58. BorderThickness="0"
  59. ItemsSource="{Binding Recipes}"
  60. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  61. <ListView.ItemsPanel>
  62. <ItemsPanelTemplate>
  63. <UniformGrid
  64. HorizontalAlignment="Left"
  65. VerticalAlignment="Top"
  66. Columns="8" />
  67. </ItemsPanelTemplate>
  68. </ListView.ItemsPanel>
  69. <ListView.ItemTemplate>
  70. <DataTemplate>
  71. <Border Margin="5" Background="LightSkyBlue">
  72. <Grid>
  73. <Grid.RowDefinitions>
  74. <RowDefinition />
  75. <RowDefinition Height="0.25*" />
  76. <RowDefinition Height="0.2*" />
  77. </Grid.RowDefinitions>
  78. <Image Source="/BPASmartClient.CustomResource;component/Image/AGV/炒锅.png" />
  79. <TextBlock
  80. Grid.Row="1"
  81. Margin="2,0,0,0"
  82. HorizontalAlignment="Center"
  83. VerticalAlignment="Center"
  84. Foreground="#dd000000"
  85. Text="{Binding RecipeName}" />
  86. <Grid
  87. Name="gr"
  88. Grid.Row="2"
  89. Height="30"
  90. Background="#00BEFA">
  91. <pry:IcoButton
  92. Width="{Binding ElementName=gr, Path=ActualWidth}"
  93. Height="{Binding ElementName=gr, Path=ActualHeight}"
  94. HorizontalAlignment="Center"
  95. VerticalAlignment="Center"
  96. BorderThickness="0"
  97. Command="{Binding DataContext.RecipeSetDownCommand, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
  98. CommandParameter="{Binding RecipeId}"
  99. Content="订单下发"
  100. EnterBackground="Red"
  101. FontStyle="Normal"
  102. Foreground="#dd000000"
  103. IcoText="&#xe6cf;"
  104. IsEnabled="{Binding IsEnable}"
  105. Style="{StaticResource IcoButtonStyle}" />
  106. </Grid>
  107. </Grid>
  108. </Border>
  109. </DataTemplate>
  110. </ListView.ItemTemplate>
  111. </ListView>
  112. </ScrollViewer>
  113. </Grid>
  114. </UserControl>