|
- <UserControl x:Class="FryPot_DosingSystem.View.RecipesSendDown"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:FryPot_DosingSystem.View"
- xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
- xmlns:vm="clr-namespace:FryPot_DosingSystem.ViewModel"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800">
- <UserControl.DataContext>
- <vm:RecipeSetDownViewModel/>
- </UserControl.DataContext>
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
- <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
- </ResourceDictionary.MergedDictionaries>
- <Style x:Key="UserItemContainerStyle" TargetType="ListBoxItem">
- <Style.Resources>
- <!-- SelectedItem with focus -->
- <SolidColorBrush
- x:Key="{x:Static SystemColors.HighlightBrushKey}"
- Opacity=".4"
- Color="White" />
- <!-- SelectedItem without focus -->
- <SolidColorBrush
- x:Key="{x:Static SystemColors.ControlBrushKey}"
- Opacity=".4"
- Color="White" />
- </Style.Resources>
- <!-- 设置触发器 -->
- <Style.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter Property="Background" Value="White" />
- <Setter Property="Foreground" Value="White" />
- </Trigger>
- <Trigger Property="IsFocused" Value="true">
- <Setter Property="Background" Value="White" />
- <Setter Property="Foreground" Value="White" />
- </Trigger>
- </Style.Triggers>
- </Style>
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="50"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Button HorizontalAlignment="Right" VerticalAlignment="Center" Content="配方一键下发" Width="110" Height="30" Margin="0,0,10,0" Cursor="Hand" Command="{Binding AllRecipeSetDownCommand}"></Button>
- <ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" >
- <ListView
- Margin="5"
- VerticalAlignment="Top"
- Background="Transparent"
- BorderThickness="0"
- ItemsSource="{Binding Recipes}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled">
- <ListView.ItemsPanel>
- <ItemsPanelTemplate>
- <UniformGrid
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- Columns="8" />
- </ItemsPanelTemplate>
- </ListView.ItemsPanel>
-
- <ListView.ItemTemplate>
- <DataTemplate>
- <Border Margin="5" Background="LightSkyBlue">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition Height="0.25*" />
- <RowDefinition Height="0.2*" />
- </Grid.RowDefinitions>
-
- <Image Source="/BPASmartClient.CustomResource;component/Image/AGV/炒锅.png" />
-
- <TextBlock
- Grid.Row="1"
- Margin="2,0,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Foreground="#dd000000"
- Text="{Binding RecipeName}" />
-
- <Grid
- Name="gr"
- Grid.Row="2"
- Height="30"
- Background="#00BEFA">
-
- <pry:IcoButton
- Width="{Binding ElementName=gr, Path=ActualWidth}"
- Height="{Binding ElementName=gr, Path=ActualHeight}"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- BorderThickness="0"
- Command="{Binding DataContext.RecipeSetDownCommand, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
- CommandParameter="{Binding RecipeId}"
- Content="订单下发"
- EnterBackground="Red"
- FontStyle="Normal"
- Foreground="#dd000000"
- IcoText=""
- IsEnabled="{Binding IsEnable}"
- Style="{StaticResource IcoButtonStyle}" />
-
-
- </Grid>
-
- </Grid>
- </Border>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- </ScrollViewer>
- </Grid>
- </UserControl>
|