|
- <Window
- x:Class="BPASmartClient.DosingHKProject.View.NewLocalRecipeView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- 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:vm="clr-namespace:BPASmartClient.DosingHKProject.ViewModel"
- Title="NewRemoteRecipeView"
- Width="700"
- Height="520"
- AllowsTransparency="True"
- Background="{x:Null}"
- Topmost="True"
- WindowStartupLocation="CenterScreen"
- WindowStyle="None"
- mc:Ignorable="d">
-
- <Window.DataContext>
- <vm:NewLocalRecipeViewModel />
- </Window.DataContext>
-
- <Window.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
- <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
-
- <ResourceDictionary>
- <!--#region ListBox样式-->
- <Style x:Key="ListBoxItemStyle1" TargetType="{x:Type ListBoxItem}">
- <Setter Property="OverridesDefaultStyle" Value="True" />
- <Setter Property="SnapsToDevicePixels" Value="True" />
- <Setter Property="BorderBrush" Value="{x:Null}" />
- <Setter Property="Foreground" Value="White" />
- <Setter Property="FontSize" Value="20" />
- <Setter Property="HorizontalContentAlignment" Value="Center" />
- <Setter Property="VerticalContentAlignment" Value="Center" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ListBoxItem}">
- <Border x:Name="border" CornerRadius="8">
- <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <!--#endregion-->
- </ResourceDictionary>
- </ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>
- </Window.Resources>
-
- <Border
- Name="br"
- BorderBrush="#0CADF5"
- BorderThickness="2">
- <Border.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/bg.png" />
- <!--<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/弹窗2.png" />-->
- </Border.Background>
- <Grid Margin="10">
- <Grid.RowDefinitions>
- <RowDefinition Height="40" />
- <RowDefinition Height="40" />
- <RowDefinition Height="40" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <Grid Grid.Row="0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition></ColumnDefinition>
- <ColumnDefinition></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <StackPanel VerticalAlignment="Center" Grid.Column="0" Orientation="Horizontal">
- <TextBlock
- Width="100"
- Margin="10,0,10,0"
- Background="Transparent"
- FontSize="20"
- Foreground="#FF2AB2E7"
- Text="配方名称:" />
- <TextBox
- Width="120"
- Height="30"
- FontSize="16"
- Text="{Binding RecipeName}" />
- </StackPanel>
- <WrapPanel VerticalAlignment="Center" Grid.Column="1">
-
- </WrapPanel>
- </Grid>
- <Grid Grid.Row="1">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="1*" />
- <ColumnDefinition Width="1*" />
- </Grid.ColumnDefinitions>
- <WrapPanel VerticalAlignment="Center" Grid.Column="0">
- <TextBlock
- Width="100"
- Margin="10,0,10,0"
- Background="Transparent"
- FontSize="20"
- Foreground="#FF2AB2E7"
- Text="配方编码:" />
- <TextBox
- Width="120"
- Height="30"
- FontSize="16"
- Text="{Binding RecipeCode}" />
- </WrapPanel>
- <WrapPanel HorizontalAlignment="Right" Orientation="Horizontal" Grid.Column="1">
- <Button
- Width="100"
- Height="40"
- Margin="5,0,5,0"
- Command="{Binding AddCommand}"
- Content="添加原料"
- FontSize="20"
- Style="{StaticResource ImageButtonStyle}" />
- <Button
- Width="100"
- Height="40"
- Margin="5,0,10,0"
- Command="{Binding SaveCommand}"
- Content="保存配方"
- FontSize="20"
- Style="{StaticResource ImageButtonStyle}" />
- <Button
- Name ="Close"
- Width="100"
- Height="40"
- Margin="5,0,5,0"
- Content="取消"
- FontSize="20"
- Style="{StaticResource ImageButtonStyle}" />
- </WrapPanel>
- </Grid>
-
-
- <!--#region 表格标题栏设置-->
- <Grid
- Grid.Row="2"
- Margin="0,10,0,0"
- Background="#ff0C255F">
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="1*"/>
- <ColumnDefinition Width="1*"/>
- </Grid.ColumnDefinitions>
- <Grid Grid.Column="0">
- <TextBlock Text="原料名称" HorizontalAlignment="Center" />
- <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
- </Grid>
- <TextBlock Grid.Column="1" Text="原料位置" HorizontalAlignment="Center" />
- <Grid Grid.Column="2">
- <TextBlock Text="原料桶号" HorizontalAlignment="Center" />
- <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
- </Grid>
- <TextBlock Grid.Column="3" Text="原料重量" HorizontalAlignment="Center" />
- <Grid Grid.Column="4">
- <TextBlock Text="功能操作" HorizontalAlignment="Center" />
- <Border BorderThickness="1,0,1,0" Cursor="SizeWE" />
- </Grid>
- <Border Grid.ColumnSpan="10" BorderThickness="1,0,1,0" />
- </Grid>
- <Grid Grid.Row="3">
- <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
- <ItemsControl ItemsSource="{Binding RawMaterial}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid Name="gr">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <Grid Grid.Column="0">
- <TextBox
- Text="{Binding RawMaterialName}" />
- <Border
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
- <TextBox
- Grid.Column="1"
- Text="{Binding RawMaterialLocation }" />
-
- <Grid Grid.Column="2">
- <TextBox
- Text="{Binding RawMaterialBarrelNum}" />
- <Border
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <TextBox
- Grid.Column="3"
- Text="{Binding RawMaterialWeight}" />
-
- <Grid Grid.Column="4">
- <Button
- Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- CommandParameter="{Binding RawMaterialLocation}"
- Content="删除"
- FontSize="16" />
- <Border
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <Border
- Grid.ColumnSpan="10"
- BorderThickness="1,0,1,1" />
-
- </Grid>
- <DataTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="true">
- <Setter TargetName="gr" Property="Background" Value="#112AB2E7" />
- </Trigger>
- </DataTemplate.Triggers>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </Grid>
-
-
- </Grid>
- </Border>
- </Window>
|