|
- <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="300" Width="500" WindowStartupLocation="CenterScreen" WindowStyle="None" Background="Transparent" MouseLeftButtonDown="Window_MouseLeftButtonDown"
- AllowsTransparency="True" Foreground="#FF2AB2E7">
- <Window.DataContext>
- <vm:CreateOrderViewModel/>
- </Window.DataContext>
- <Window.Resources>
-
- </Window.Resources>
- <Border>
- <Border.Background>
- <ImageBrush ImageSource="../image/容器边框.png"/>
- </Border.Background>
- <Grid Background="Transparent">
- <Grid.RowDefinitions>
- <RowDefinition Height="50"/>
- <RowDefinition Height="*"/>
- <RowDefinition Height="40"/>
- <RowDefinition Height="5"/>
- </Grid.RowDefinitions>
- <TextBlock Text="创建订单" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20" Margin="0,3,0,0 "/>
- <Button Content="添加配方" Width="80" Height="24" HorizontalAlignment="Right" Margin="10,10,2,0" VerticalAlignment="Bottom"
- Style="{DynamicResource ButtonStyle}"
- 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">
- <Border Background="Transparent" BorderBrush="Transparent" BorderThickness="1">
- <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"
- FontFamily="楷体"
- FontSize="20"
- Foreground="#FF2AB2E7"
- 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"
- Foreground="Orange"
- Background="Transparent"
- Grid.Column="1"
- Width="60"
- Height="29"
- Margin="3,1"
- VerticalAlignment="Center"
- FontSize="20"
- Text="{Binding RecipeCount}"
- />
-
- <TextBlock
- Grid.Column="1"
- Foreground="#FF2AB2E7"
- Margin="0,0,8,4"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- FontSize="20"
- Text="单" />
-
- </StackPanel>
-
- <Button
- Grid.Column="2"
- Width="50"
- Height="24" BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7"
- FontSize="14"
- Background="Transparent"
- Command="{Binding DataContext.DeleteCommand, RelativeSource={RelativeSource AncestorType=Window, Mode=FindAncestor}}"
- CommandParameter="{Binding ID}"
- Content="删 除" />
-
- </Grid>
- </Border>
-
- </ControlTemplate>
- </RadioButton.Template>
- </RadioButton>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </Border>
-
- <StackPanel Grid.Row="2" Grid.ColumnSpan="3" Orientation="Horizontal"
- HorizontalAlignment="Center" VerticalAlignment="Center">
- <Button Content="保存" FontSize="18" Width="100" Height="24" Margin="10,2" Background="Transparent"
- HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
- BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Style="{DynamicResource ButtonStyle}"
- Command="{Binding SaveCommand}"/>
- <Button Content="取消" FontSize="18" Width="100" Height="24" Margin="10,2" Background="Transparent"
- HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
- BorderBrush="#FF2AB2E7" Foreground="#FF2AB2E7" Style="{DynamicResource ButtonStyle}"
- Click="Button_Click"/>
- </StackPanel>
- </Grid>
- </Border>
- </Window>
|