FoupTopView.xaml 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <UserControl x:Class="VirgoUI.Client.Controls.Parts.FoupTopView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. mc:Ignorable="d" Width="100" Height="66"
  7. d:DesignHeight="120" d:DesignWidth="100">
  8. <UserControl.Resources>
  9. <Storyboard x:Key="FoupLoaded">
  10. <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Canvas.Top)" >
  11. <EasingDoubleKeyFrame KeyTime="0" Value="20"/>
  12. <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="10"/>
  13. </DoubleAnimationUsingKeyFrames>
  14. </Storyboard>
  15. <Storyboard x:Key="FoupUnloaded">
  16. <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Canvas.Top)" >
  17. <EasingDoubleKeyFrame KeyTime="0" Value="10"/>
  18. <EasingDoubleKeyFrame KeyTime="0:0:0.5" Value="20"/>
  19. </DoubleAnimationUsingKeyFrames>
  20. </Storyboard>
  21. <Style TargetType="{x:Type Image}" x:Key="LP_Animation" >
  22. <Style.Triggers>
  23. <DataTrigger Binding="{Binding IsFoupLoaded, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}" Value="true">
  24. <DataTrigger.EnterActions>
  25. <BeginStoryboard Storyboard="{StaticResource FoupLoaded}"/>
  26. </DataTrigger.EnterActions>
  27. <DataTrigger.ExitActions>
  28. <BeginStoryboard Storyboard="{StaticResource FoupUnloaded}"/>
  29. </DataTrigger.ExitActions>
  30. </DataTrigger>
  31. </Style.Triggers>
  32. </Style>
  33. </UserControl.Resources>
  34. <Canvas x:Name="canvas" Width="100" Margin="0" >
  35. <Canvas.ContextMenu>
  36. <ContextMenu>
  37. <MenuItem Header="Home" Click="Home"/>
  38. <MenuItem Header="Reset" Click="Reset" />
  39. <MenuItem Header="Abort" Click="Abort" />
  40. <MenuItem Header="Load" Click="Load"/>
  41. <MenuItem Header="Unload" Click="Unload"/>
  42. <MenuItem Header="Read Carrier ID" Click="ReadCarrierID"/>
  43. <MenuItem Header="Clamp" Click="Clamp" />
  44. <MenuItem Header="Unclamp" Click="Unclamp"/>
  45. <MenuItem Header="Dock" Click="Dock" />
  46. <MenuItem Header="Undock" Click="Undock"/>
  47. <MenuItem Header="Open Door" Click="OpenDoor"/>
  48. <MenuItem Header="Close Door" Click="CloseDoor" />
  49. <MenuItem Header="Map" Click="Map"/>
  50. </ContextMenu>
  51. </Canvas.ContextMenu>
  52. <Image Canvas.Top="20" Style="{StaticResource LP_Animation}" Source="/VirgoUI;component/Themes/Images/STPicture/foupTopView.png" Width="100" Height="120" />
  53. <Canvas.RenderTransform>
  54. <TranslateTransform Y="{Binding CanvasYPosition}">
  55. </TranslateTransform>
  56. </Canvas.RenderTransform>
  57. </Canvas>
  58. </UserControl>