|
- <Window
- x:Class="BPASmartClient.SmallBatchingSystem.Views.NewRecipeView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:con="clr-namespace:BPASmartClient.SmallBatchingSystem.Converter"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:BPASmartClient.SmallBatchingSystem.Views"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:vm="clr-namespace:BPASmartClient.SmallBatchingSystem.ViewModels"
- Title="NewPfView"
- Width="500"
- Height="300"
- AllowsTransparency="True"
- Background="{x:Null}"
- Topmost="True"
- WindowStartupLocation="CenterScreen"
- WindowStyle="None"
- mc:Ignorable="d">
-
- <Window.DataContext>
- <vm:NewRecipeViewModel />
- </Window.DataContext>
-
- <Grid>
- <Grid.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/容器边框.png" />
- </Grid.Background>
-
- <Grid.RowDefinitions>
- <RowDefinition Height="0.18*" />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="20"
- Foreground="{StaticResource FontColor}"
- Text="新建配方" />
-
- <Grid Grid.Row="1">
- <Grid.RowDefinitions>
- <RowDefinition Height="0.2*" />
- <RowDefinition Height="0.2*" />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <TextBlock
- Margin="15,0,0,0"
- HorizontalAlignment="Left"
- Style="{StaticResource TextBlockStyle}"
- Text="配方名称:" />
-
- <TextBlock
- Margin="0,0,10,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="20"
- Foreground="#FFF53F62"
- Text="{Binding ErrorInfo}" />
-
- <StackPanel
- Grid.Row="1"
- Margin="10,0,0,0"
- Orientation="Horizontal">
-
- <TextBox
- Name="outName"
- Width="180"
- Height="35"
- Margin="5,0,0,0"
- FontSize="20"
- Style="{StaticResource TextBoxStyle}"
- Text="{Binding RecipeName}" />
-
- <Button
- Width="90"
- Height="30"
- Margin="5,0,5,0"
- Command="{Binding AddCommand}"
- Content="添加原料"
- FontSize="20"
- Style="{StaticResource ImageButtonStyle}" />
-
- <Button
- Width="90"
- Height="30"
- Margin="5,0,5,0"
- Command="{Binding CancelCommand}"
- Content="取消"
- FontSize="20"
- Style="{StaticResource ImageButtonStyle}" />
-
- <Button
- Grid.Column="1"
- Width="90"
- Height="30"
- Margin="5,0,5,0"
- Command="{Binding SaveCommand}"
- Content="保存"
- FontSize="20"
- Style="{StaticResource ImageButtonStyle}" />
- </StackPanel>
-
- <Grid Grid.Row="2" Margin="15,0,10,10">
-
- <Grid.RowDefinitions>
- <RowDefinition Height="35" />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <!--#region 表格标题栏设置-->
- <Grid Margin="0,10,0,0" Background="#ff0C255F">
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition Width="0.68*" />
- </Grid.ColumnDefinitions>
-
-
- <TextBlock
- Grid.Column="0"
- Style="{StaticResource TitleTextblockStyle}"
- Text="选择料仓" />
-
- <Grid Grid.Column="1">
- <TextBlock Style="{StaticResource TitleTextblockStyle}" Text="重量( g )" />
- <Border
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0"
- Cursor="SizeWE" />
- </Grid>
-
- <TextBlock
- Grid.Column="2"
- Style="{StaticResource TitleTextblockStyle}"
- Text="功能操作" />
-
- <Border
- Grid.ColumnSpan="2"
- BorderBrush="{StaticResource bordColor}"
- BorderThickness="1,0,1,0" />
-
- </Grid>
- <!--#endregion-->
-
-
- <ScrollViewer
- Grid.Row="1"
- HorizontalScrollBarVisibility="Hidden"
- VerticalScrollBarVisibility="Hidden">
- <ItemsControl ItemsSource="{Binding SiloInfos}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <RadioButton GroupName="all">
- <RadioButton.Template>
- <ControlTemplate TargetType="RadioButton">
- <Grid Name="gr" Height="30">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- <ColumnDefinition Width="0.68*" />
- </Grid.ColumnDefinitions>
-
- <ComboBox
- Name="cb"
- Grid.Column="0"
- Height="{Binding ElementName=gr, Path=ActualHeight}"
- VerticalAlignment="Center"
- BorderBrush="#FF074B92"
- BorderThickness="1"
- FontFamily="楷体"
- FontSize="20"
- Foreground="#FF2AB2E7"
- IsEditable="False"
- ItemsSource="{Binding DataContext.SileName, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- SelectedIndex="{Binding SelectIndex}"
- Style="{StaticResource ComboBoxStyle}"
- Text="{Binding SiloName}" />
-
- <Grid Grid.Column="1">
- <TextBox
- Height="{Binding ElementName=gr, Path=ActualHeight}"
- FontSize="20"
- Style="{StaticResource InputTextboxStyle}"
- Text="{Binding SiloWeight}" />
- <Border
- BorderBrush="#FF074B92"
- BorderThickness="1,0,1,1"
- Cursor="SizeWE" />
- </Grid>
-
-
-
- <Button
- Grid.Column="2"
- Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- CommandParameter="{Binding SiloName}"
- Content="删除"
- FontSize="16"
- Style="{StaticResource ControlButtonStyle}" />
-
- <!--<Button
- Grid.Column="2"
- Command="{Binding DataContext.RemoveCommand, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- CommandParameter="{Binding SiloName}"
- Content="删除" />-->
-
- </Grid>
-
-
- </ControlTemplate>
- </RadioButton.Template>
- </RadioButton>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
-
- </Grid>
-
-
-
- </Grid>
-
- </Grid>
-
- </Window>
|