终端一体化运控平台
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

122 řádky
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 Name="sv" Grid.Row="1" PreviewMouseWheel="ScrollViewer_PreviewMouseWheel" VerticalScrollBarVisibility="Hidden" >
  54. <ListView
  55. VerticalAlignment="Top"
  56. Background="Transparent"
  57. BorderThickness="0"
  58. ItemsSource="{Binding Recipes}"
  59. ScrollViewer.HorizontalScrollBarVisibility="Disabled">
  60. <ListView.ItemsPanel>
  61. <ItemsPanelTemplate>
  62. <!--<UniformGrid
  63. HorizontalAlignment="Left"
  64. VerticalAlignment="Top"
  65. Columns="8" />-->
  66. <WrapPanel/>
  67. </ItemsPanelTemplate>
  68. </ListView.ItemsPanel>
  69. <ListView.ItemTemplate>
  70. <DataTemplate>
  71. <Border Margin="3.5" Width="230" Height="280" 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. Margin="0,0,0,-9"
  91. Background="#00BEFA">
  92. <pry:IcoButton
  93. Width="{Binding ElementName=gr, Path=ActualWidth}"
  94. Height="{Binding ElementName=gr, Path=ActualHeight}"
  95. BorderThickness="0"
  96. Command="{Binding DataContext.RecipeSetDownCommand, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
  97. CommandParameter="{Binding RecipeId}"
  98. Content="订单下发"
  99. EnterBackground="Red"
  100. FontStyle="Normal"
  101. Foreground="#dd000000"
  102. IcoText="&#xe6cf;"
  103. IsEnabled="{Binding IsEnable}"
  104. Style="{StaticResource IcoButtonStyle}" />
  105. </Grid>
  106. </Grid>
  107. </Border>
  108. </DataTemplate>
  109. </ListView.ItemTemplate>
  110. </ListView>
  111. </ScrollViewer>
  112. </Grid>
  113. </UserControl>