RecipeLoopSetView.xaml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <UserControl x:Class="FurnaceUI.Views.Editors.RecipeLoopSetView"
  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:FurnaceUI.Views.Editors" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:cal="http://www.caliburn.org"
  7. mc:Ignorable="d"
  8. Height="460" Width="400" FontFamily="Segoe">
  9. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Width="400">
  10. <Grid>
  11. <Grid.RowDefinitions>
  12. <RowDefinition/>
  13. <RowDefinition Height="55"/>
  14. <RowDefinition Height="60"/>
  15. </Grid.RowDefinitions>
  16. <ListView AlternationCount="1"
  17. x:Name="RecipeList"
  18. VerticalContentAlignment="Top"
  19. ScrollViewer.HorizontalScrollBarVisibility="Auto"
  20. ScrollViewer.VerticalScrollBarVisibility="Auto"
  21. ScrollViewer.CanContentScroll="True"
  22. ItemsSource="{Binding StepNames}" SelectedIndex="{Binding SelectedIndex}" >
  23. <ListView.ItemsPanel>
  24. <ItemsPanelTemplate>
  25. <StackPanel></StackPanel>
  26. </ItemsPanelTemplate>
  27. </ListView.ItemsPanel>
  28. <ListView.ItemContainerStyle>
  29. <Style TargetType="{x:Type ListViewItem}">
  30. <Setter Property="Template">
  31. <Setter.Value>
  32. <ControlTemplate TargetType="{x:Type ListViewItem}">
  33. <Grid>
  34. <Grid.ColumnDefinitions>
  35. <ColumnDefinition Width="*"/>
  36. </Grid.ColumnDefinitions>
  37. <!--<Border x:Name="BD_Collector" CornerRadius="5" Background="DarkSeaGreen" BorderBrush="Black" BorderThickness="1" Width="auto" Height="30" Margin="5,0,0,0">
  38. <Label Content="{Binding StepNo}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="13">
  39. </Label>
  40. </Border>-->
  41. <Border x:Name="BD_Collector2" CornerRadius="5" Background="DarkSeaGreen" BorderBrush="Black" BorderThickness="1" Width="auto" Height="30" Margin="1,0,5,0">
  42. <Label Content="{Binding StepName}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="13">
  43. </Label>
  44. </Border>
  45. </Grid>
  46. <ControlTemplate.Triggers>
  47. <Trigger Property="IsMouseOver" Value="True">
  48. <!--<Setter TargetName="BD_Collector" Property="Background" Value="YellowGreen"/>-->
  49. <Setter TargetName="BD_Collector2" Property="Background" Value="YellowGreen"/>
  50. </Trigger>
  51. <Trigger Property="IsSelected" Value="True">
  52. <!--<Setter TargetName="BD_Collector" Property="Background" Value="DarkGreen"/>-->
  53. <Setter TargetName="BD_Collector2" Property="Background" Value="DarkGreen"/>
  54. </Trigger>
  55. </ControlTemplate.Triggers>
  56. </ControlTemplate>
  57. </Setter.Value>
  58. </Setter>
  59. </Style>
  60. </ListView.ItemContainerStyle>
  61. </ListView>
  62. <StackPanel Orientation="Horizontal" Visibility="{Binding LoopCountVisibility}" Height="35" Width="293" Grid.Row="1">
  63. <TextBlock Text="Loop Counts : " TextAlignment="Center" VerticalAlignment="Center"></TextBlock>
  64. <TextBox Text="{Binding LoopCounts, UpdateSourceTrigger=PropertyChanged}" Tag="Number" Width="210">
  65. </TextBox>
  66. </StackPanel>
  67. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="2">
  68. <Button Content="Save" Width="120" Margin="0,10,20,10">
  69. <i:Interaction.Triggers>
  70. <i:EventTrigger EventName="Click">
  71. <cal:ActionMessage MethodName="Save"/>
  72. </i:EventTrigger>
  73. </i:Interaction.Triggers>
  74. </Button>
  75. <Button Content="Cancel" Width="120" Margin="0,10,20,10">
  76. <i:Interaction.Triggers>
  77. <i:EventTrigger EventName="Click">
  78. <cal:ActionMessage MethodName="Close"/>
  79. </i:EventTrigger>
  80. </i:Interaction.Triggers>
  81. </Button>
  82. </StackPanel>
  83. </Grid>
  84. </Border>
  85. </UserControl>