|
- <UserControl
- x:Class="BPASmartClient.DosingHKProject.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.DosingHKProject.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.DosingHKProject.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>
-
- </UserControl.Resources>
-
- <UserControl.DataContext>
- <vm:RecipeReceiveViewModel />
- </UserControl.DataContext>
-
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="50"/>
- <RowDefinition />
- </Grid.RowDefinitions>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
- <pry:IcoButton
- Width="140"
- Margin="10"
- HorizontalAlignment="Right"
- Command="{Binding NewRecipe}"
- Content="自定义配方"
- FontSize="16"
- Foreground="Aqua"
- IcoText=""
- Style="{StaticResource IcoButtonStyle}" />
- <pry:IcoButton
- Width="140"
- Margin="10"
- HorizontalAlignment="Right"
- Command="{Binding NewSimulateRecipe}"
- Content="新建模拟配方"
- FontSize="16"
- Foreground="Aqua"
- IcoText=""
- Style="{StaticResource IcoButtonStyle}" />
-
- <pry:IcoButton
- Width="140"
- Margin="10"
- HorizontalAlignment="Right"
- Command="{Binding ClearAllRecipe}"
- Content="清除所有配方"
- FontSize="16"
- Foreground="Aqua"
- IcoText=""
- IsEnabled="True"
- Style="{StaticResource IcoButtonStyle}" />
- </StackPanel>
- <ScrollViewer Grid.Row="1">
- <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" />
- <WrapPanel Grid.Row="1">
- <TextBlock
- Margin="2,0,0,0"
- Foreground="#dd000000"
- Text="名称:" />
- <TextBlock
- Margin="2,0,0,0"
- Foreground="#dd000000"
- Text="{Binding RecipeName}" />
- <TextBlock
- Margin="5,0,0,0"
- Foreground="#dd000000"
- Text="编号:" />
- <TextBlock
- Margin="2,0,0,0"
- Foreground="#dd000000"
- Text="{Binding RecipeCode}" />
- </WrapPanel>
-
- <Grid
- Name="gr"
- Grid.Row="2"
- Height="30">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
- <pry:IcoButton
- Grid.Column="0"
- Height="{Binding ElementName=gr, Path=ActualHeight}"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- BorderThickness="0"
- Command="{Binding DataContext.DetailsCommand, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
- CommandParameter="{Binding RecipeCode}"
- Content="编辑"
- EnterBackground="#FF2AB2E7"
- Foreground="#dd000000"
- IcoText=""
- Style="{StaticResource IcoButtonStyle}" />
- <pry:IcoButton
- Grid.Column="1"
- Height="{Binding ElementName=gr, Path=ActualHeight}"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- BorderThickness="0"
- Command="{Binding DataContext.IssueRecipe, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
- CommandParameter="{Binding RecipeCode}"
- Content="下发"
- EnterBackground="#FF2AB2E7"
- Foreground="#dd000000"
- IcoText=""
- Style="{StaticResource IcoButtonStyle}" />
- <pry:IcoButton
- Grid.Column="2"
- Height="{Binding ElementName=gr, Path=ActualHeight}"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- BorderThickness="0"
- Command="{Binding DataContext.RemoveRecipe, RelativeSource={RelativeSource AncestorType=ListView, Mode=FindAncestor}}"
- CommandParameter="{Binding RecipeCode}"
- Content="删除"
- EnterBackground="#FF2AB2E7"
- Foreground="#dd000000"
- IcoText=""
- Style="{StaticResource IcoButtonStyle}" />
- </Grid>
-
- </Grid>
- </Border>
- </DataTemplate>
- </ListView.ItemTemplate>
- </ListView>
- </ScrollViewer>
- </Grid>
- </UserControl>
|