FoupItem.xaml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <UserControl x:Class="Aitex.Sorter.UI.Controls.FoupItem"
  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">
  10. <UserControl.Resources>
  11. <local:FoupModeConverter x:Key="FoupModeConverter" />
  12. <local:ItemIndexConverter x:Key="ItemIndexConverter" />
  13. </UserControl.Resources>
  14. <Border x:Name="root" Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActualHeight}" Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=ActualWidth}" Background="{Binding CarrierMode,Converter={StaticResource FoupModeConverter}}">
  15. <Grid>
  16. <Grid.RowDefinitions>
  17. <RowDefinition Height="25" />
  18. <RowDefinition Height="*" />
  19. <RowDefinition Height="8" />
  20. </Grid.RowDefinitions>
  21. <TextBlock Grid.Row="0" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Title}" FontSize="24" />
  22. <ItemsControl Grid.Column="1" Grid.Row="1" x:Name="Slot" ItemsSource="{Binding Slots}" AlternationCount="{Binding SlotCount}">
  23. <ItemsControl.ItemTemplate>
  24. <DataTemplate>
  25. <local:Wafer Height="9.5" Margin="0" Padding="0" Grid.Column="1" WaferItem="{Binding}" Station="{Binding ElementName=Slot, Path=DataContext.Station}" WaferTransferCommand ="{Binding ElementName=Slot, Path=DataContext.WaferTransferCommand}" WaferTransferOptionCommand="{Binding ElementName=Slot, Path=DataContext.WaferTransferOptionCommand}" ShowSlot="True" WaferIDDisplayMode="LaserMarker" ShowControl="{Binding ElementName=Slot,Path=DataContext.ShowControl}">
  26. <local:Wafer.Slot>
  27. <MultiBinding Converter="{StaticResource ItemIndexConverter }">
  28. <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="(ItemsControl.AlternationIndex)"/>
  29. <Binding ElementName="Slot" Path="DataContext.SlotCount" />
  30. </MultiBinding>
  31. </local:Wafer.Slot>
  32. <!--<local:Wafer.Slot>
  33. <MultiBinding Converter="{StaticResource waferIDConverter }">
  34. <Binding/>
  35. <Binding ElementName="Slot" Path="ItemsSource"/>
  36. </MultiBinding>
  37. </local:Wafer.Slot>-->
  38. </local:Wafer>
  39. </DataTemplate>
  40. </ItemsControl.ItemTemplate>
  41. </ItemsControl>
  42. </Grid>
  43. </Border>
  44. </UserControl>