|
- <Window x:Class="BPASmart.RecipeManagement.View.CreateOrder"
- 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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:local="clr-namespace:BPASmart.RecipeManagement.View"
- xmlns:vm="clr-namespace:BPASmart.RecipeManagement.ViewModel"
- mc:Ignorable="d"
- Title="CreateOrder" Height="250" Width="400" WindowStartupLocation="CenterScreen" WindowStyle="None" Background="White" MouseLeftButtonDown="Window_MouseLeftButtonDown">
- <Window.DataContext>
- <vm:CreateOrderViewModel/>
- </Window.DataContext>
- <Window.Resources>
-
- </Window.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="40"/>
- <RowDefinition Height="*"/>
- <RowDefinition Height="40"/>
- </Grid.RowDefinitions>
- <Button Content="增加配方" Width="100" Height="30" HorizontalAlignment="Right" Margin="10,0"
- Background="#58B0ED" Foreground="White" Command="{Binding AddRecipeCommand}"/>
-
- <Border Grid.Row="1" BorderBrush="#B0E2FF" BorderThickness="0,1">
- <ItemsControl ItemsSource="{Binding recipes}" Grid.Row="1" HorizontalAlignment="Center">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <RadioButton GroupName="all">
- <RadioButton.Template>
- <ControlTemplate TargetType="RadioButton">
- <Grid Name="gr" Height="40">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="150"/>
- <ColumnDefinition Width="100" />
- <ColumnDefinition Width="60" />
- </Grid.ColumnDefinitions>
-
- <ComboBox
- Name="cb"
- Grid.Column="0"
- Margin="3,1"
- VerticalAlignment="Center"
- BorderBrush="Black"
- BorderThickness="1"
- FontFamily="楷体"
- FontSize="20"
- Foreground="Black"
- IsEditable="False"
- ItemsSource="{Binding DataContext.recipesName, RelativeSource={RelativeSource AncestorType=ItemsControl, Mode=FindAncestor}}"
- SelectedItem="{Binding Name}"
- />
-
-
- <StackPanel
- Grid.Column="1"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <TextBox
- Name="tb"
- Grid.Column="1"
- Width="60"
- Height="29"
- Margin="3,1"
- VerticalAlignment="Center"
- FontSize="20"
- Text="{Binding RecipeCount}" />
-
- <TextBlock
- Grid.Column="1"
- Margin="0,0,8,4"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="20"
- Text="单" />
-
- </StackPanel>
-
- <Button
- Grid.Column="2"
- Width="50"
- Height="24"
-
- Foreground="White"
- FontSize="14"
- Background="#58B0ED"
- Command="{Binding DataContext.DeleteCommand, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}"
- CommandParameter="{Binding ID}"
- Content="删 除" />
-
- </Grid>
-
-
- </ControlTemplate>
- </RadioButton.Template>
- </RadioButton>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </Border>
-
- <StackPanel Grid.Row="4" Grid.ColumnSpan="3" Orientation="Horizontal"
- HorizontalAlignment="Center" VerticalAlignment="Center">
- <Button Content="保存" Foreground="White" FontSize="22" Width="120" Height="30" Margin="10,2" Background="#58B0ED"
- Command="{Binding SaveCommand}"/>
- <Button Content="取消" Foreground="White" FontSize="22" Width="120" Height="30" Margin="10,2" Background="#58B0ED"
- Click="Button_Click"/>
-
-
- </StackPanel>
- </Grid>
- </Window>
|