|
- <UserControl x:Class="BPASmartClient.DosingSystem.View.MaterialDosageView"
- 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:BPASmartClient.DosingSystem.View"
- xmlns:vm ="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
- xmlns:con ="clr-namespace:BPASmartClient.DosingSystem.Converter"
- xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800">
- <UserControl.DataContext>
- <vm:MaterialDosageViewModel/>
- </UserControl.DataContext>
- <UserControl.Resources>
- <Style x:Key="myText" TargetType="TextBox">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="TextBox">
- <Border Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" Background="Transparent" BorderBrush="White" BorderThickness="0.4">
- <TextBlock Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Text}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="RadioState" TargetType="RadioButton">
- <Setter Property="Margin" Value="1" />
- <Setter Property="Background" Value="Transparent" />
- <Setter Property="Foreground" Value="#ddd" />
- <Setter Property="VerticalContentAlignment" Value="Bottom" />
- <Setter Property="Margin" Value="2,5" />
- <Setter Property="FontSize" Value="16" />
- <Setter Property="FontFamily" Value="Consolas" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="RadioButton">
- <Border
- Name="radiobutton"
- Background="{TemplateBinding Background}"
- CornerRadius="5"
- Opacity="0.85">
- <Grid>
- <!--<Border
- x:Name="back_border"
- BorderBrush="Black"
- BorderThickness="0"
- CornerRadius="1">
- <Border.Effect>
- <BlurEffect KernelType="Gaussian" Radius="2" />
- </Border.Effect>
- </Border>
- <Border
- x:Name="fore_border"
- Margin="2"
- BorderBrush="White"
- BorderThickness="0"
- CornerRadius="{Binding ElementName=button, Path=CornerRadius}"
- Opacity="0.7">
- <Border.Effect>
- <BlurEffect KernelType="Gaussian" Radius="2" />
- </Border.Effect>
- </Border>-->
-
-
- <ContentPresenter
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Content="{TemplateBinding Content}"
- TextBlock.FontFamily="{TemplateBinding FontFamily}"
- TextBlock.FontSize="{TemplateBinding FontSize}"
- TextBlock.Foreground="{TemplateBinding Foreground}" />
-
- <Image
- Name="im"
- Source="/BPASmartClient.CustomResource;component/Image/按钮/组 8.png"
- Stretch="Fill" />
- </Grid>
- </Border>
-
- <ControlTemplate.Triggers>
- <Trigger Property="IsChecked" Value="True">
- <!--<Setter TargetName="back_border" Property="BorderThickness" Value="1,0,1,1" />
- <Setter TargetName="back_border" Property="CornerRadius" Value="5" />
- <Setter TargetName="fore_border" Property="BorderThickness" Value="0,2,0,0" />
- <Setter Property="Background" Value=" #4169E1" />-->
- <Setter TargetName="im" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/按钮/组 7.png" />
-
- </Trigger>
-
- <Trigger Property="IsChecked" Value="False">
- <Setter TargetName="im" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/按钮/组 8.png" />
- </Trigger>
-
- <Trigger Property="IsMouseOver" Value="True">
- <!--<Setter TargetName="back_border" Property="BorderBrush" Value="white" />
- <Setter TargetName="back_border" Property="BorderThickness" Value="1,1,1,1" />-->
- <Setter TargetName="radiobutton" Property="Opacity" Value="1" />
- <!--<Setter TargetName="im" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/按钮背景蓝色.png" />-->
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
-
- </Setter.Value>
-
- </Setter>
-
- </Style>
- </UserControl.Resources>
- <Grid Margin="20,10" >
- <Grid.RowDefinitions>
- <RowDefinition Height="50"/>
- <RowDefinition Height="30"/>
- <RowDefinition/>
- <RowDefinition Height="30"/>
- </Grid.RowDefinitions>
- <Grid Margin="0,0,0,10" HorizontalAlignment="Right" VerticalAlignment="Center">
- <pry:ImageBorder Width="{Binding ElementName=ggr, Path=ActualWidth}" Height="{Binding ElementName=ggr, Path=ActualHeight}" />
- <UniformGrid Columns="5" HorizontalAlignment="Center" VerticalAlignment="Center">
- <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal">
- <TextBlock Text="进桶计数:" Foreground="White" Style="{StaticResource TitleTextblockStyle}" FontSize="20"/>
- <TextBlock Margin="10,0,0,0" Width="40" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding InRecipe,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" Foreground="Red" Style="{StaticResource TextBlockStyle}" FontSize="18"/>
- </StackPanel>
- <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal">
- <TextBlock Text="出桶计数:" Foreground="White" Style="{StaticResource TitleTextblockStyle}" FontSize="20"/>
- <TextBlock Margin="10,0,0,0" Width="40" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding OutRecipe,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" Foreground="Red" Style="{StaticResource TextBlockStyle}" FontSize="18"/>
- </StackPanel>
- <RadioButton Margin="20,2" Click="RadioButton_Click" Content="正在执行记录" GroupName="state" IsChecked="True" Style="{DynamicResource RadioState}" />
- <RadioButton Margin="20,2" Click="RadioButton_Click_1" Content="已完成记录" GroupName="state" Style="{DynamicResource RadioState}" />
- <RadioButton Margin="20,2" Click="RadioButton_Click_2" Content="历史记录" GroupName="state" Style="{DynamicResource RadioState}" />
- </UniformGrid>
- </Grid>
- <Grid Grid.Row="1">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="60"/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <TextBox Text="配方名称" Foreground="White" Style="{StaticResource myText}" />
- <UniformGrid Grid.Column="1" Columns="19">
- <TextBox Style="{StaticResource myText}" Text="1" Foreground="White" />
- <TextBox Style="{StaticResource myText}" Text="2" Foreground="White"/>
- <TextBox Style="{StaticResource myText}" Text="3" Foreground="White"/>
- <TextBox Style="{StaticResource myText}" Text="4" Foreground="White" />
- <TextBox Text="5" Foreground="White" Style="{StaticResource myText}" />
- <TextBox Text="6" Foreground="White" Style="{StaticResource myText}"/>
- <TextBox Text="7" Foreground="White" Style="{StaticResource myText}"/>
- <TextBox Text="8" Foreground="White" Style="{StaticResource myText}"/>
- <TextBox Text="9" Foreground="White" Style="{StaticResource myText}"/>
- <TextBox Text="10" Foreground="White" Style="{StaticResource myText}"/>
- <TextBox Text="11" Foreground="White" Style="{StaticResource myText}"/>
- <TextBox Text="12" Foreground="White" Style="{StaticResource myText}"/>
- <TextBox Text="13" Foreground="White" Style="{StaticResource myText}"/>
- <TextBox Text="14" Foreground="White" Style="{StaticResource myText}"/>
- <TextBox Text="15" Foreground="White" Style="{StaticResource myText}"/>
- <TextBox Text="16" Foreground="White" Style="{StaticResource myText}"/>
- <TextBox Text="17" Foreground="White" Style="{StaticResource myText}"/>
- <TextBox Text="18" Foreground="White" Style="{StaticResource myText}"/>
- <TextBox Text="总量" Foreground="White" Style="{StaticResource myText}"/>
- </UniformGrid>
- </Grid>
- <Grid Grid.Row="2" x:Name="OnGrid">
- <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
- <ItemsControl x:Name="test" >
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid Height="30">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="60"/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <TextBox Text="{Binding RecipeName}" Foreground="White" Style="{StaticResource myText}" />
- <ItemsControl Grid.Column="1" Height="30" ItemsSource="{Binding Matrialsweight}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <UniformGrid Columns="19"/>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <TextBox Text="{Binding Weight}" Foreground="White" IsReadOnly="True" Style="{StaticResource myText}" />
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </Grid>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </Grid>
- </Grid>
- </UserControl>
|