FoupItemPro.xaml 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <UserControl x:Class="Aitex.Sorter.UI.Controls.FoupItemPro"
  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. xmlns:local="clr-namespace:Aitex.Sorter.UI.Controls"
  7. xmlns:common="clr-namespace:Aitex.Sorter.UI.Controls.Common;assembly=Aitex.Sorter.UI"
  8. mc:Ignorable="d"
  9. d:DesignHeight="300" d:DesignWidth="300" PreviewKeyDown="UserControl_PreviewKeyDown">
  10. <UserControl.Resources>
  11. <local:FoupModeConverter x:Key="FoupModeConverter" />
  12. <local:ItemIndexConverter2 x:Key="ItemIndexConverter2" />
  13. <local:ShowSlotItemConverter x:Key="ShowSlotItemConverter" />
  14. </UserControl.Resources>
  15. <Border x:Name="root" Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActualHeight}" Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActualWidth}" Background="{Binding CarrierMode,Converter={StaticResource FoupModeConverter}}">
  16. <Grid>
  17. <Grid.RowDefinitions>
  18. <RowDefinition Height="25" />
  19. <RowDefinition Height="*" />
  20. <RowDefinition Height="8" />
  21. </Grid.RowDefinitions>
  22. <TextBlock Grid.Row="0" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Title}" FontSize="24" />
  23. <ItemsControl Grid.Column="1" Grid.Row="1" x:Name="Slot" ItemsSource="{Binding Slots}" AlternationCount="25">
  24. <ItemsControl.Resources>
  25. <Style TargetType="{x:Type local:WaferPro}">
  26. <EventSetter Event="local:WaferPro.PreviewMouseLeftButtonDown" Handler="lbItem_PreviewMouseLeftButtonDown"/>
  27. <EventSetter Event="local:WaferPro.PreviewMouseMove" Handler="lbItem_PreviewMouseMove"/>
  28. <EventSetter Event="Drop" Handler="Slot_Drop"/>
  29. </Style>
  30. </ItemsControl.Resources>
  31. <ItemsControl.ItemTemplate>
  32. <DataTemplate>
  33. <local:WaferPro Height="9.5" Margin="0" Padding="0" Grid.Column="1" ShowSlotIndex="{Binding ElementName=Slot,Path=DataContext.ShowSlotsIndex}" WaferIDDisplayMode="LaserMarker" WaferItem="{Binding}" Station="{Binding ElementName=Slot, Path=DataContext.Station}" WaferTransferCommand ="{Binding ElementName=Slot, Path=DataContext.WaferTransferCommand}" WaferTransferOptionCommand="{Binding ElementName=Slot, Path=DataContext.WaferTransferOptionCommand}" ShowControl="{Binding ElementName=Slot,Path=DataContext.ShowControl}">
  34. <local:WaferPro.Slot>
  35. <MultiBinding Converter="{StaticResource ItemIndexConverter2 }">
  36. <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="(ItemsControl.AlternationIndex)"/>
  37. <Binding ElementName="Slot" Path="DataContext.SlotCount" />
  38. </MultiBinding>
  39. </local:WaferPro.Slot>
  40. <local:WaferPro.ShowSlot>
  41. <MultiBinding Converter="{StaticResource ShowSlotItemConverter }">
  42. <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="(ItemsControl.AlternationIndex)"/>
  43. <Binding ElementName="Slot" Path="DataContext.SlotCount" />
  44. </MultiBinding>
  45. </local:WaferPro.ShowSlot>
  46. <!--<local:Wafer.Slot>
  47. <MultiBinding Converter="{StaticResource waferIDConverter }">
  48. <Binding/>
  49. <Binding ElementName="Slot" Path="ItemsSource"/>
  50. </MultiBinding>
  51. </local:Wafer.Slot>-->
  52. </local:WaferPro>
  53. </DataTemplate>
  54. </ItemsControl.ItemTemplate>
  55. </ItemsControl>
  56. </Grid>
  57. </Border>
  58. </UserControl>