|
- <UserControl
- x:Class="BPASmartClient.JXJFoodBigStation.View.RecipeReceiveView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:control="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:BPASmartClient.JXJFoodBigStation.View"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
- xmlns:vm="clr-namespace:BPASmartClient.JXJFoodBigStation.ViewModel"
- d:DesignHeight="450"
- d:DesignWidth="800"
- mc:Ignorable="d">
-
- <UserControl.Resources>
-
-
-
- <SolidColorBrush x:Key="BorderSolid" Color="#5523CACA" />
- <SolidColorBrush x:Key="FontColor" Color="#FF2AB2E7" />
- <SolidColorBrush x:Key="TitleFontColor" Color="#ddd" />
- <SolidColorBrush x:Key="CursorColor" Color="Aqua" />
- <SolidColorBrush x:Key="TitleBorderColor" Color="#FF2AB2E7" />
- <SolidColorBrush x:Key="TextBlockForeground" Color="#9934F7F7" />
-
- <Style x:Key="TextBlockStyle" TargetType="TextBlock">
- <Setter Property="FontFamily" Value="楷体" />
- <Setter Property="FontSize" Value="20" />
- <Setter Property="Background" Value="Transparent" />
- <!--<Setter Property="Foreground" Value="{StaticResource FontColor}" />-->
- <Setter Property="VerticalAlignment" Value="Center" />
- <Setter Property="HorizontalAlignment" Value="Center" />
- </Style>
-
- <Style x:Key="buttonStyle" TargetType="Button">
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="FontSize" Value="16" />
- <Setter Property="Foreground" Value="Aqua" />
- <Setter Property="HorizontalAlignment" Value="Center" />
- <Setter Property="BorderThickness" Value="0" />
- </Style>
-
- <!--#region 下拉列表样式-->
- <Style x:Key="ToggleButtonStyle" TargetType="{x:Type ToggleButton}">
- <Setter Property="FocusVisualStyle" Value="{x:Null}" />
- <!--<Setter Property="Height" Value="10" />-->
- <Setter Property="HorizontalContentAlignment" Value="Left" />
- <Setter Property="VerticalContentAlignment" Value="Top" />
- <Setter Property="Padding" Value="10,10" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ToggleButton}">
- <Grid>
- <Border
- x:Name="border2"
- Width="auto"
- Margin="{TemplateBinding Padding}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- Background="{TemplateBinding Background}">
- <ContentPresenter
- Margin="{TemplateBinding Padding}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- RecognizesAccessKey="True"
- SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
- </Border>
- </Grid>
-
- <ControlTemplate.Triggers>
- <!--<Trigger Property="IsPressed" Value="true">
- <Setter Property="Background" Value="#FFd2e7f4" />
- </Trigger>
- <Trigger Property="IsChecked" Value="true">
- <Setter TargetName="border2" Property="Background" Value="#191E36" />
- </Trigger>
- <Trigger Property="IsChecked" Value="false">
- <Setter TargetName="border2" Property="Background" Value="#191E36" />
- </Trigger>-->
- <!--<Trigger Property="IsEnabled" Value="false">
- <Setter Property="Foreground" Value="White" />
- </Trigger>-->
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="border2" Property="Background" Value="#191E36" />
- </Trigger>
- <Trigger Property="IsMouseOver" Value="False">
- <Setter TargetName="border2" Property="Background" Value="Transparent" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
-
- <Style x:Key="ExpanderStyle" TargetType="{x:Type Expander}">
- <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
- <Setter Property="HorizontalContentAlignment" Value="Stretch" />
- <Setter Property="VerticalContentAlignment" Value="Stretch" />
- <Setter Property="BorderBrush" Value="Transparent" />
- <Setter Property="BorderThickness" Value="1" />
-
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Expander}">
- <DockPanel>
- <ToggleButton
- x:Name="HeaderSite"
- Height="20"
- Width="auto"
- MinWidth="0"
- MinHeight="0"
- Margin="1"
- Padding="{TemplateBinding Padding}"
- Background="Transparent"
- HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
- Content="{TemplateBinding Header}"
- ContentTemplate="{TemplateBinding HeaderTemplate}"
- ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
- DockPanel.Dock="Top"
- FontFamily="{TemplateBinding FontFamily}"
- FontSize="{TemplateBinding FontSize}"
- FontStretch="{TemplateBinding FontStretch}"
- FontStyle="{TemplateBinding FontStyle}"
- FontWeight="{TemplateBinding FontWeight}"
- Foreground="{TemplateBinding Foreground}"
- IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
- Style="{StaticResource ToggleButtonStyle}" />
- <ContentPresenter
- x:Name="ExpandSite"
- Margin="{TemplateBinding Padding}"
- HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
- VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
- DockPanel.Dock="Left"
- Focusable="false"
- Visibility="Visible" />
- </DockPanel>
- <ControlTemplate.Triggers>
- <Trigger Property="IsExpanded" Value="True">
- <Setter TargetName="ExpandSite" Property="Visibility" Value="Collapsed" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--#endregion-->
-
- </UserControl.Resources>
-
- <UserControl.DataContext>
- <vm:RecipeReceiveViewModel />
- </UserControl.DataContext>
-
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="50"/>
- <RowDefinition />
- </Grid.RowDefinitions>
- <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
- <pry:IcoButton
- Width="140"
- Margin="10"
- HorizontalAlignment="Left"
- Command="{Binding NewRecipe}"
- Content="新建配方"
- FontSize="16"
- Foreground="Aqua"
- IcoText=""
- Style="{StaticResource IcoButtonStyle}" />
- <pry:IcoButton
- Width="140"
- Margin="10"
- HorizontalAlignment="Left"
- Command="{Binding NewSimulateRecipe}"
- Content="新建模拟配方"
- FontSize="16"
- Foreground="Aqua"
- IcoText=""
- Style="{StaticResource IcoButtonStyle}" />
-
- <pry:IcoButton
- Grid.Column="3"
- Width="140"
- Margin="10"
- HorizontalAlignment="Left"
- Command="{Binding ClearAllRecipe}"
- Content="清除所有配方"
- FontSize="16"
- Foreground="Aqua"
- IcoText=""
- IsEnabled="True"
- Style="{StaticResource IcoButtonStyle}" />
- </StackPanel>
- <ScrollViewer Grid.Row="1">
- <ListBox
- Grid.Row="2"
- Margin="5"
- VerticalAlignment="Top"
- Background="Transparent"
- BorderThickness="0"
- ItemsSource="{Binding Recipes}"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled">
- <ListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <UniformGrid
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- Columns="8" />
- </ItemsPanelTemplate>
- </ListBox.ItemsPanel>
-
- <ListBox.ItemTemplate>
- <DataTemplate>
-
- <Grid
- Name="tt"
- Height="220"
- Margin="5">
- <Grid.RowDefinitions>
- <RowDefinition Height="30" />
- <RowDefinition Height="20" />
- <RowDefinition Height="128" />
- <RowDefinition Height="2" />
- <RowDefinition Height="40" />
- </Grid.RowDefinitions>
-
- <Image
- Grid.RowSpan="5"
- Source="/BPASmartClient.CustomResource;component/Image/配方背景/竖背景框.png"
- Stretch="Fill" />
-
- <TextBlock
- Grid.Row="0"
- Margin="2,5,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Top"
- FontSize="18"
- Foreground="#FF2AB2E7"
- Text="{Binding RecipeName}" />
-
- <TextBlock
- Grid.Row="1"
- Margin="5,0,0,0"
- VerticalAlignment="Top"
- Foreground="#FF2AB2E7"
- Text="配方信息:" />
-
- <ScrollViewer
- Grid.Row="2"
- VerticalAlignment="Top"
- Background="Transparent"
- HorizontalScrollBarVisibility="Hidden"
- VerticalScrollBarVisibility="Hidden">
- <ItemsControl ItemsSource="{Binding RawMaterial}">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <StackPanel/>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Expander Style="{StaticResource ExpanderStyle}" Margin="40,0,0,0">
- <Expander.Header>
- <StackPanel Orientation="Horizontal">
- <Border Width="15" Height="15" CornerRadius="15" HorizontalAlignment="Left" Margin="0,0,5,0">
- <Border.Background>
- <RadialGradientBrush>
- <GradientStop Color="#FF2AB2E7" Offset="0.5" />
- <GradientStop Color="White"/>
- </RadialGradientBrush>
- </Border.Background>
- </Border>
- <TextBlock Text="{Binding RawMaterialLocation }" Foreground="#FF2AB2E7" VerticalAlignment="Center"/>
- </StackPanel>
- </Expander.Header>
- <Expander.Content>
- <StackPanel Margin="36,0,0,0">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="托盘编号:" Foreground="#FF2AB2E7"/>
- <TextBlock Text="{Binding RawMaterialBarrelNum}" Foreground="#FF2AB2E7"/>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="原料重量:" Foreground="#FF2AB2E7"/>
- <TextBlock Text="{Binding RawMaterialWeight}" Foreground="#FF2AB2E7"/>
- </StackPanel>
- </StackPanel>
-
- </Expander.Content>
- </Expander>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
-
-
- </ScrollViewer>
-
- <Image
- Grid.Row="3"
- Width="{Binding ElementName=tt, Path=ActualWidth}"
- Height="2"
- VerticalAlignment="Bottom"
- Source="/BPASmartClient.CustomResource;component/Image/直线.png"
- Stretch="Fill" />
-
- <Grid
- Name="gr"
- Grid.Row="4"
- Height="30"
- Margin="0,0,0,10"
- VerticalAlignment="Bottom"
- Background="Transparent">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <!--<Image
- Height="2"
- Grid.ColumnSpan="2"
- Width="{Binding ElementName=gr, Path=ActualWidth}"
- VerticalAlignment="Top"
- Source="/BPASmartClient.CustomResource;component/Image/直线.png" />-->
-
- <!--<pry:IcoButton
- Grid.Column="1"
- Width="{Binding ElementName=gr, Path=ActualWidth}"
- Height="{Binding ElementName=gr, Path=ActualHeight}"
- Margin="4,4,4,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Background="#11F53F62"
- BorderThickness="0"
- Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
- CommandParameter="{Binding RecipCode}"
- Content="删除"
- EnterBackground="#22F53F62"
- FontStyle="Normal"
- Foreground="#FFF53F62"
- IcoText=""
- Style="{StaticResource IcoButtonStyle}" />-->
-
- <pry:IcoButton
- Grid.Column="1"
- Width="{Binding ElementName=gr, Path=ActualWidth}"
- Height="{Binding ElementName=gr, Path=ActualHeight}"
- Margin="3,4,4,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Background="#11F53F62"
- BorderThickness="0"
- Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
- CommandParameter="{Binding RecipeCode}"
- Content="删除"
- EnterBackground="#22F53F62"
- Foreground="#FFF53F62"
- IcoText=""
- Style="{StaticResource IcoButtonStyle}" />
-
- <pry:IcoButton
-
- Width="{Binding ElementName=gr, Path=ActualWidth}"
- Height="{Binding ElementName=gr, Path=ActualHeight}"
- Margin="3,4,4,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Background="#112AB2E7"
- BorderThickness="0"
- Command="{Binding DataContext.DetailsCommand, RelativeSource={RelativeSource AncestorType=ListBox, Mode=FindAncestor}}"
- CommandParameter="{Binding RecipeCode}"
- Content="编辑"
- EnterBackground="#222AB2E7"
- Foreground="#FF2AB2E7"
- IcoText=""
- Style="{StaticResource IcoButtonStyle}" />
-
- </Grid>
-
- </Grid>
-
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </ScrollViewer>
- </Grid>
- </UserControl>
|