|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- <UserControl x:Class="FryPot_DosingSystem.View.RecipeSendDownView"
- 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:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:FryPot_DosingSystem.View"
- xmlns:vm="clr-namespace:FryPot_DosingSystem.ViewModel"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800">
- <UserControl.DataContext>
- <vm:RecipeSetDownViewModel/>
- </UserControl.DataContext>
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
- <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
- </ResourceDictionary.MergedDictionaries>
-
- </ResourceDictionary>
-
- </UserControl.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="50"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Button HorizontalAlignment="Right" VerticalAlignment="Center" Content="配方一键下发" Width="110" Height="30" Margin="0,0,10,0" Cursor="Hand" Command="{Binding AllRecipeSetDownCommand}"></Button>
- <ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
- <ItemsControl ItemsSource="{Binding Recipes}">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <StackPanel></StackPanel>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Border BorderBrush="Aqua" BorderThickness="2" CornerRadius="14" Height="120" Margin="5,5,10,5">
- <RadioButton>
- <RadioButton.Template>
- <ControlTemplate>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"></ColumnDefinition>
- <ColumnDefinition Width="0.01*"></ColumnDefinition>
-
- <ColumnDefinition Width="4*"></ColumnDefinition>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <!--<Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="70"></RowDefinition>
- <RowDefinition></RowDefinition>
- </Grid.RowDefinitions>
- <Viewbox Stretch="Fill" HorizontalAlignment="Center" Width="200">
- <TextBlock Text="{Binding RecipeName}" HorizontalAlignment="Center" ></TextBlock>
- </Viewbox>
- --><!--<Button Grid.Row="1" Width="100" Content="配方下发" Command="{Binding DataContext.RecipeSetDownCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}"
- CommandParameter="{Binding RecipeId}" Cursor="Hand"></Button>--><!--
-
- </Grid>-->
- <Viewbox Stretch="Uniform" HorizontalAlignment="Center" Width="200">
- <TextBlock Text="{Binding RecipeName}" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
- </Viewbox>
- <Line StrokeThickness="3" Grid.Column="1" HorizontalAlignment="Left" Stroke="LawnGreen" X1="0" Y1="5" X2="0" Y2="110"></Line>
- <Grid Grid.Column="2">
- <!--后续添加内容-->
- <ScrollViewer VerticalScrollBarVisibility="Hidden" >
- <ItemsControl ItemsSource="{Binding materialCollection}" HorizontalAlignment="Center">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <StackPanel></StackPanel>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <RadioButton
- HorizontalAlignment="Center" >
- <RadioButton.Template>
- <ControlTemplate>
- <Grid ShowGridLines="True" HorizontalAlignment="Center" Width="600">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="0.1*"/>
- <ColumnDefinition Width="0.3*"/>
- <ColumnDefinition Width="0.3*"/>
- <ColumnDefinition Width="0.3*"/>
- </Grid.ColumnDefinitions>
- <Border Width="15" Height="15" CornerRadius="15">
- <Border.Background>
- <RadialGradientBrush>
- <GradientStop Color="#99e6ff" Offset="0.5"/>
- <GradientStop Color="white"/>
- </RadialGradientBrush>
- </Border.Background>
- </Border>
- <TextBlock Grid.Column="1" Text="{Binding MaterialName }" Margin="30,5,0,5" FontSize="20" HorizontalAlignment="Left"></TextBlock>
- <TextBlock Grid.Column="2" Text="{Binding MaterialLoc}" Margin="30,5,0,5" FontSize="20" HorizontalAlignment="Left"></TextBlock>
- <StackPanel Orientation="Horizontal" Grid.Column="3">
- <TextBlock Text="{Binding MaterialWeight}" Margin="30,5,2,5" FontSize="20" HorizontalAlignment="Center"></TextBlock>
- <TextBlock Foreground="LightSeaGreen" Text="g" FontSize="20" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
- </StackPanel>
- </Grid>
- </ControlTemplate>
- </RadioButton.Template>
- </RadioButton>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </Grid>
- <Grid Grid.Column="3">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="3"/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <Line StrokeThickness="3" Grid.Column="0" HorizontalAlignment="Left" Stroke="LawnGreen" X1="0" Y1="5" X2="0" Y2="110"></Line>
- <StackPanel Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center">
- <TextBlock FontSize="16" Text="{Binding RecipeSetInfo}" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
- <Button Margin="0,5,0,0" Height="27" Command="{Binding DataContext.RecipeSetDownCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}" CommandParameter="{Binding RecipeId}" Cursor="Hand" >
- <Button.Template>
- <ControlTemplate TargetType="{x:Type Button}">
- <StackPanel Orientation="Horizontal" >
- <TextBlock Name="title" FontFamily="../Resources/fonts/#iconfont" Text="" FontSize="21" VerticalAlignment="Bottom"></TextBlock>
- <TextBlock Name="text" Text="配方下发" Height="Auto" FontSize="24"></TextBlock>
- </StackPanel>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="title" Property="Foreground" Value="Cyan"/>
- <Setter TargetName="text" Property="Foreground" Value="Cyan"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
-
- </Button.Template>
- </Button>
-
- </StackPanel>
-
- </Grid>
- </Grid>
-
- </ControlTemplate>
- </RadioButton.Template>
- </RadioButton>
- </Border>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </Grid>
- </UserControl>
|