|
- <UserControl x:Class="BPASmart.RecipeManagement.View.OrderManager"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:BPASmart.RecipeManagement.View"
- xmlns:vm ="clr-namespace:BPASmart.RecipeManagement.ViewModel"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800" Background="Transparent" Foreground="#FF2AB2E7">
- <UserControl.DataContext>
- <vm:OrderManagerViewModel/>
- </UserControl.DataContext>
- <UserControl.Resources>
- <Style TargetType="ListBoxItem">
- <Setter Property="Margin" Value="2"/>
- <Setter Property="FontSize" Value="22"/>
- <Setter Property="FontWeight" Value="Black"/>
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="FontFamily" Value="楷体"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="ListBoxItem">
- <Border BorderBrush="Black" BorderThickness="0" Background="Transparent">
- <Grid HorizontalAlignment="Center" Margin="10 ">
- <Grid.RowDefinitions>
- <RowDefinition/>
- <RowDefinition/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <TextBlock
- Grid.Row="0"
- Margin="5,0,0,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Foreground="#aa2AB2E7"
- FontFamily="微软雅黑"
- FontWeight="Light"
- Text="配方:" />
- <TextBlock
- Grid.Row="1"
- Margin="5,0,0,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Foreground="#aa2AB2E7"
- FontFamily="微软雅黑"
- FontWeight="Light"
- Text="数量:" />
- <TextBlock
- Grid.Row="2"
- Margin="5,0,0,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Foreground="#aa2AB2E7"
- FontFamily="微软雅黑"
- FontWeight="Light"
- Text="已完成:" />
- <TextBlock
- Grid.Row="0"
- Grid.Column="1"
- Margin="5,0,0,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Foreground="#aa2AB2E7"
- FontFamily="微软雅黑"
- FontWeight="Light"
- Text="{Binding Name}" />
- <TextBlock
- Grid.Row="1"
- Grid.Column="1"
- Margin="5,0,0,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Foreground="#aa2AB2E7"
- FontFamily="微软雅黑"
- FontWeight="Light"
- Text="{Binding RecipeCount}" />
- <TextBlock
- Grid.Row="2"
- Grid.Column="1"
- Margin="5,0,0,0"
- HorizontalAlignment="Right"
- VerticalAlignment="Center"
- Foreground="#aa2AB2E7"
- FontFamily="微软雅黑"
- FontWeight="Light"
- Text="" />
- </Grid>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style TargetType="ListViewItem" >
- <Setter Property="Margin" Value="10"/>
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="ListViewItem">
- <Border x:Name="mborder" Margin="10" Padding="2" BorderThickness="1" BorderBrush="Transparent" Opacity="0.7"
- >
- <Border>
- <Border.Background>
- <ImageBrush ImageSource="../image/边框效果2.png"/>
- </Border.Background>
- <Grid
- Background="Transparent"
- Name="tt"
- Height="250"
- Width="300"
- Margin="5">
- <Grid.RowDefinitions>
- <RowDefinition Height="30" />
- <RowDefinition Height="*" />
- <RowDefinition Height="4" />
- <RowDefinition Height="40" />
- </Grid.RowDefinitions>
- <StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
- <TextBlock
- Grid.Row="0"
- Margin="2,5,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Top"
- FontSize="18"
- Foreground="White"
- FontFamily="楷体"
- Text="下单时间: " />
- <TextBlock
- Grid.Row="0"
- Margin="2,5,0,0"
- HorizontalAlignment="Center"
- VerticalAlignment="Top"
- FontSize="18"
- Foreground="White"
- FontFamily="楷体"
- Text="{Binding OrderdateTime}" />
- </StackPanel>
-
- <ScrollViewer
- Grid.Row="1"
- Margin="20,10"
- VerticalAlignment="Top"
- Background="#11F53F62"
- HorizontalScrollBarVisibility="Hidden"
- VerticalScrollBarVisibility="Auto">
- <ListBox ItemsSource="{Binding Recipes}" FontFamily="楷体" BorderBrush="Transparent" Background="Transparent" >
-
- </ListBox>
-
- </ScrollViewer>
- <Image Grid.Row="2" Source="../image/直线.png" Stretch="Fill"/>
- <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
- <Button Content="执行订单" Width="100" Height="24" HorizontalAlignment="Right" Margin="10,0" Foreground="#ff2bd06f"
- BorderBrush="Transparent" Background="#332bd06f" Opacity="0.9" Style="{DynamicResource GreenButton}"
-
- Command="{Binding }"
- />
- <Button Content="删除订单" Width="100" Height="24" HorizontalAlignment="Right" Margin="10,0" Foreground="#FFF53F62"
- BorderBrush="Transparent" Background="#24F53F62" Opacity="0.9"
- Style="{DynamicResource DeleteButton}"
- Command="{Binding }"
- CommandParameter="{Binding}"/>
- </StackPanel>
- </Grid>
- </Border>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="BorderBrush" Value="#4169E1" TargetName="mborder"/>
- <Setter Property="Opacity" Value="1" TargetName="mborder"/>
- </Trigger>
- <Trigger Property="IsFocused" Value="True">
-
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </UserControl.Resources>
- <Border>
- <Border.Background>
- <ImageBrush ImageSource="../image/中间.png"/>
- </Border.Background>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="17"/>
- <RowDefinition Height="40"/>
- <RowDefinition Height="28"/>
- <RowDefinition />
- </Grid.RowDefinitions>
- <TextBlock Grid.Row="1" Text="订单列表" FontSize="28" VerticalAlignment="Center" HorizontalAlignment="Center"/>
- <Button Grid.Row="2" Content="创建订单" Width="100" Height="28" HorizontalAlignment="Right" Margin="20,0" Style="{DynamicResource CommonButton}"
- Command="{Binding CreateOrderCommand}"/>
- <ListView Grid.Row="3" Margin="0" Background="Transparent" BorderBrush="Transparent"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{Binding orders}" >
-
-
- <ListBox.ItemsPanel>
- <ItemsPanelTemplate>
- <WrapPanel Margin="10"/>
- </ItemsPanelTemplate>
- </ListBox.ItemsPanel>
- </ListView>
- </Grid>
- </Border>
- </UserControl>
|