|
- <Window x:Class="BPASmartClient.MorkF.View.LocalMenu"
- 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:BPASmartClient.MorkF.View"
- xmlns:vm="clr-namespace:BPASmartClient.MorkF.ViewModel"
- mc:Ignorable="d"
- Title="LocalMenu" Height="800" Width="800" WindowStartupLocation="CenterScreen" WindowStyle="None" AllowsTransparency="True" MouseLeftButtonDown="Window_MouseLeftButtonDown">
- <Window.DataContext>
- <vm:LocalMenuViewModel/>
- </Window.DataContext>
- <Window.Resources>
- <Style TargetType="ListBoxItem" >
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type ListBoxItem}">
- <Border BorderBrush="Black" BorderThickness="0" Background="White">
- <Grid Width="600" HorizontalAlignment="Center" VerticalAlignment="Center" >
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition/>
- <ColumnDefinition Width="2*"/>
- <ColumnDefinition/>
- <ColumnDefinition/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <TextBox Grid.Column="0" Text="{Binding FryTime}" HorizontalAlignment="Center" VerticalAlignment="Center" />
- <TextBox Grid.Column="1" Text="{Binding During}" Margin="10,0"/>
- <ComboBox Grid.Column="2" Width="120" ItemsSource="{Binding DataContext.strPotActions , RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor}}"
- SelectedValue="{Binding Actions}" Margin="10,0"/>
- <TextBox Grid.Column="3" Text="{Binding SeasoningLists[0].Loc}" Margin="10,0"/>
- <TextBox Grid.Column="4" Text="{Binding SeasoningLists[0].Qty}" Margin="10,0"/>
- <Button Grid.Column="5" Content="删除" Margin="10,0" HorizontalAlignment="Center"
- Command="{Binding DataContext.Delete, RelativeSource={RelativeSource AncestorType=Window,Mode=FindAncestor}}"
- CommandParameter="{Binding DataContext, RelativeSource={RelativeSource AncestorType=ListBoxItem,Mode=FindAncestor}}"/>
- </Grid>
- </Border>
-
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </Window.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="50"/>
- <RowDefinition Height="50"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
- <Button Content="增加步骤" Command="{Binding AddFryTime}" Width="120" Height="40" Margin="10,0"/>
- <Button Content="保存" Command="{Binding Save}" Width="120" Height="40" Margin="10,0"/>
- <Button Content="退出" Click="Button_Click" Width="120" Height="40" Margin="10,0"/>
- </StackPanel>
-
- <Grid Grid.Row="1" Width="600" HorizontalAlignment="Center" VerticalAlignment="Center">
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition/>
- <ColumnDefinition Width="2*"/>
- <ColumnDefinition/>
- <ColumnDefinition/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <TextBlock Grid.Column="0" Text="步骤" HorizontalAlignment="Center"/>
- <TextBlock Grid.Column="1" Text="时间" HorizontalAlignment="Center"/>
- <TextBlock Grid.Column="2" Text="动作" HorizontalAlignment="Center"/>
- <TextBlock Grid.Column="3" Text="调料位置" HorizontalAlignment="Center"/>
- <TextBlock Grid.Column="4" Text="调料重量" HorizontalAlignment="Center"/>
- <TextBlock Grid.Column="5" Text="删除" HorizontalAlignment="Center"/>
- </Grid>
- <ListBox x:Name="listview1" Grid.Row="2" BorderBrush="Black" BorderThickness="0" HorizontalAlignment="Center" AllowDrop="True"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled" ItemsSource="{Binding PotActionStep}" Margin=" 10" Background="Transparent"
-
- >
-
- </ListBox>
- </Grid>
- </Window>
|