|
- <UserControl
- x:Class="BPASmartClient.CustomResource.UserControls.MaterialStock"
- 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:local="clr-namespace:BPASmartClient.CustomResource.UserControls"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- d:DesignHeight="450"
- d:DesignWidth="800"
- mc:Ignorable="d">
- <UserControl.Resources>
- <PathGeometry x:Key="move" Figures="M 0,0 L 0,10" />
-
- </UserControl.Resources>
- <Border HorizontalAlignment="Center">
- <Viewbox HorizontalAlignment="Center" VerticalAlignment="Center">
-
- <Canvas
- Width="205"
- Height="245"
- Margin="5">
- <Polygon Canvas.Left="67" Points="0,80 20,40 205,40 185,80">
- <Polygon.RenderTransform>
- <SkewTransform AngleX="-40" />
- </Polygon.RenderTransform>
- <Polygon.Fill>
- <!--<LinearGradientBrush StartPoint="1,0" EndPoint="1,1">
- <GradientStop Color="LightGray" Offset="0"/>
- <GradientStop Color="WhiteSmoke" Offset="0.85"/>
- <GradientStop Color="LightGray" Offset="1"/>
- </LinearGradientBrush>-->
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/不锈钢纹理2.jpeg" Stretch="Fill" />
- </Polygon.Fill>
- </Polygon>
- <Polygon
- Canvas.Left="67"
- Width="200"
- Height="70"
- Points="45,70 60,50 170,50 155,70"
- Stroke="Gray"
- StrokeThickness="2">
- <Polygon.RenderTransform>
- <SkewTransform AngleX="-40" />
- </Polygon.RenderTransform>
- </Polygon>
- <Polygon
- x:Name="stock"
- Canvas.Left="67"
- Width="0"
- Height="0"
- Points="45,70 60,50 170,50 155,70">
- <Polygon.Fill>
- <SolidColorBrush Color="DimGray" />
- </Polygon.Fill>
- <Polygon.RenderTransform>
- <SkewTransform AngleX="-40" />
- </Polygon.RenderTransform>
- </Polygon>
- <Polygon Panel.ZIndex="1" Points="-5,90 0,80 185,80 180,90">
- <Polygon.Fill>
- <LinearGradientBrush>
- <GradientStop Offset="0" Color="LightGray" />
- <GradientStop Offset="0.66" Color="White" />
- <GradientStop Offset="0.95" Color="LightGray" />
- </LinearGradientBrush>
- </Polygon.Fill>
-
- </Polygon>
- <Grid
- Canvas.Top="80"
- Width="185"
- Height="160">
- <Grid.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/不锈钢纹理.jpg" Stretch="Fill" />
- </Grid.Background>
- <!--<Grid VerticalAlignment="Bottom" Height="20" Margin="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <Button Width="60">
- <Button.Template>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border x:Name="br" BorderThickness="2" BorderBrush="DimGray" CornerRadius="5" Background="Orange">
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" >
- <TextBlock VerticalAlignment="Center" Text="" FontFamily="/BPASmartClient.CustomResource;component/Fonts/new/#iconfont" Margin="0,0,5,0"/>
- <TextBlock Text="开盖" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="14"/>
- </StackPanel>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsPressed" Value="True">
- <Setter Property="Background" Value="yellow" TargetName="br"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
-
- </Button.Template>
- </Button>
- <Button Width="60" Grid.Column="1">
- <Button.Template>
- <ControlTemplate TargetType="{x:Type Button}">
- <Border x:Name="br1" BorderThickness="2" BorderBrush="DimGray" CornerRadius="5" Background="yellowgreen">
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" >
- <TextBlock VerticalAlignment="Center" Text="" FontFamily="/BPASmartClient.CustomResource;component/Fonts/new/#iconfont" Margin="0,0,5,0"/>
- <TextBlock Text="出料" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="14"/>
- </StackPanel>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsPressed" Value="True">
- <Setter Property="Background" Value="lawngreen" TargetName="br1"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Button.Template>
- </Button>
- </Grid>-->
- </Grid>
- <Grid
- Canvas.Top="90"
- Width="185"
- Height="60">
- <Grid.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/不锈钢纹理2.jpeg" />
- </Grid.Background>
- <Grid.RenderTransform>
- <TranslateTransform X="-5" />
- </Grid.RenderTransform>
- <TextBox
- x:Name="stockName"
- Width="58"
- Height="50"
- HorizontalAlignment="Left"
- HorizontalContentAlignment="Center"
- VerticalContentAlignment="Center"
- Background="Transparent"
- BorderThickness="0"
- FontSize="13"
- Foreground="DarkSlateGray" />
-
-
- <Border
- Width="80"
- Height="50"
- Margin="15,0,0,0"
- BorderBrush="DimGray "
- BorderThickness="2"
- CornerRadius="5">
- <StackPanel>
- <TextBlock
- Margin="0,2,0,5"
- HorizontalAlignment="Center"
- FontFamily="幼圆"
- FontSize="12"
- Text="剩余重量" />
- <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
- <TextBlock
- x:Name="stockWeight"
- HorizontalAlignment="Center"
- FontSize="16" />
- <TextBlock FontSize="16" Text="Kg" />
- </StackPanel>
- </StackPanel>
- </Border>
- </Grid>
- <Grid
- Canvas.Left="180"
- Canvas.Top="90"
- Width="40"
- Height="60">
- <Grid.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/不锈钢纹理3.jpeg" Stretch="UniformToFill" />
- </Grid.Background>
- <Grid.RenderTransform>
- <TransformGroup>
- <ScaleTransform ScaleX="0.119" />
- <SkewTransform AngleY="-65.5" />
- </TransformGroup>
- </Grid.RenderTransform>
- <!--<Border VerticalAlignment="Top" Height="140" BorderThickness="10">
- <Border.Background>
- <SolidColorBrush Color="BlueViolet"/>
- </Border.Background>
- </Border>-->
- <!--<Grid VerticalAlignment="Bottom" Height="40" Margin="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <Border Background="#FFAAAAAA" Margin="2"/>
- <Border Background="#FFAAAAAA" Margin="2" Grid.Column="1"/>
- </Grid>-->
- </Grid>
- <Path
- x:Name="arrow"
- Canvas.Left="113"
- Canvas.Top="175"
- Data="M -15,8 L 17,17 C 17,17 19,18 17,19 L 17,19 L -15,28 C -15,28 -17,28.2 -16,26 L -16,26 L -5,18 L -16,10 C -16,10 -17,8.5 -15,8 Z"
- Visibility="Collapsed">
- <Path.RenderTransform>
- <TransformGroup>
- <RotateTransform Angle="90" />
- <TranslateTransform Y="0" />
- </TransformGroup>
- </Path.RenderTransform>
- <Path.Fill>
- <LinearGradientBrush>
- <LinearGradientBrush.RelativeTransform>
- <RotateTransform Angle="-15" />
- </LinearGradientBrush.RelativeTransform>
- <GradientStop Offset="0" Color="LightGray" />
- <GradientStop Offset="0.4" Color="White" />
- <GradientStop Offset="1" Color="AntiqueWhite" />
- </LinearGradientBrush>
- </Path.Fill>
- </Path>
- <!--<Path Data="M 95,190 L 95,200" Stroke="Red"/>-->
-
- <Grid
- Canvas.Left="185"
- Canvas.Top="80"
- Width="185"
- Height="160">
- <Grid.Background>
- <ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/不锈钢纹理.jpg" />
- </Grid.Background>
- <Grid.RenderTransform>
- <TransformGroup>
- <ScaleTransform ScaleX="0.288" />
- <SkewTransform AngleY="-36.8" />
- </TransformGroup>
- </Grid.RenderTransform>
- <!--<Border VerticalAlignment="Top" Height="140" BorderThickness="10">
- <Border.Background>
- <DrawingBrush TileMode="Tile" ViewportUnits="Absolute" Viewport="1,0,25,1">
- <DrawingBrush.Drawing>
- <GeometryDrawing>
- <GeometryDrawing.Pen>
- <Pen Brush="#EEE"/>
- </GeometryDrawing.Pen>
- <GeometryDrawing.Geometry>
- <PathGeometry>
- <PathFigure>
- <LineSegment Point="10,0"/>
- <LineSegment Point="10,10"/>
- </PathFigure>
- </PathGeometry>
- </GeometryDrawing.Geometry>
- </GeometryDrawing>
- </DrawingBrush.Drawing>
- </DrawingBrush>
- </Border.Background>
- </Border>-->
- <!--<Grid VerticalAlignment="Bottom" Height="40" Margin="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <Border Background="#FFAAAAAA" Margin="2"/>
- <Border Background="#FFAAAAAA" Margin="2" Grid.Column="1"/>
- </Grid>-->
- </Grid>
-
- <Border
- Canvas.Left="150"
- Canvas.Top="100"
- Width="18"
- Height="18"
- CornerRadius="10">
- <Border.Background>
- <RadialGradientBrush>
- <GradientStop x:Name="gsGreen" Offset="0.6" Color="Gray" />
- <GradientStop Color="White" />
- </RadialGradientBrush>
- </Border.Background>
- </Border>
- <Border
- Canvas.Left="150"
- Canvas.Top="125"
- Width="18"
- Height="18"
- CornerRadius="10">
- <Border.Background>
- <RadialGradientBrush>
- <GradientStop x:Name="gsRed1" Offset="0.6" Color="Gray" />
- <GradientStop Color="White" />
- </RadialGradientBrush>
- </Border.Background>
- </Border>
-
- </Canvas>
- </Viewbox>
- <VisualStateManager.VisualStateGroups>
- <VisualStateGroup Name="StockGroup">
- <VisualState Name="OpenState">
- <Storyboard>
- <DoubleAnimation
- Storyboard.TargetName="stock"
- Storyboard.TargetProperty="Width"
- From="0"
- To="200"
- Duration="00:0:1" />
- <DoubleAnimation
- Storyboard.TargetName="stock"
- Storyboard.TargetProperty="Height"
- From="0"
- To="70"
- Duration="00:0:1" />
- </Storyboard>
- </VisualState>
- <VisualState Name="CloseState">
- <Storyboard>
- <DoubleAnimation
- Storyboard.TargetName="stock"
- Storyboard.TargetProperty="Width"
- From="200"
- To="0"
- Duration="00:0:1" />
- <DoubleAnimation
- Storyboard.TargetName="stock"
- Storyboard.TargetProperty="Height"
- From="70"
- To="0"
- Duration="00:0:1" />
- </Storyboard>
- </VisualState>
- </VisualStateGroup>
- <VisualStateGroup Name="RunStateGroup">
- <VisualState Name="RunState">
- <Storyboard>
- <ColorAnimationUsingKeyFrames Storyboard.TargetName="gsGreen" Storyboard.TargetProperty="Color">
- <DiscreteColorKeyFrame KeyTime="0" Value="Green" />
- </ColorAnimationUsingKeyFrames>
- </Storyboard>
- </VisualState>
- <VisualState Name="Stop" />
- </VisualStateGroup>
- <VisualStateGroup x:Name="FaultStateGroup">
- <VisualState Name="FaultState">
- <Storyboard>
- <ColorAnimationUsingKeyFrames
- RepeatBehavior="Forever"
- Storyboard.TargetName="gsRed1"
- Storyboard.TargetProperty="Color">
- <DiscreteColorKeyFrame KeyTime="0:0:0.5" Value="Red" />
- <DiscreteColorKeyFrame KeyTime="0:0:1" Value="Gray" />
- </ColorAnimationUsingKeyFrames>
- </Storyboard>
- </VisualState>
- <VisualState Name="NormalState" />
- </VisualStateGroup>
- <VisualStateGroup x:Name="LayOffStateGroup">
- <VisualState Name="LayOffState">
- <Storyboard>
- <DoubleAnimationUsingPath
- PathGeometry="{StaticResource move}"
- RepeatBehavior="Forever"
- Source="Y"
- Storyboard.TargetName="arrow"
- Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(Y)"
- Duration="0:0:1" />
- </Storyboard>
- </VisualState>
- <VisualState Name="LayStopState" />
-
- </VisualStateGroup>
- </VisualStateManager.VisualStateGroups>
- </Border>
- </UserControl>
|