AlarmErrorJumpStepView.xaml 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <UserControl x:Class="FurnaceUI.Views.Editors.AlarmErrorJumpStepView"
  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:cal="http://www.caliburn.org" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800">
  9. <UserControl.Resources>
  10. <DataTemplate x:Key="StepNameTemplate">
  11. <StackPanel Orientation="Horizontal" Margin="-5,-2,0,0">
  12. <Border BorderThickness="1" BorderBrush="Black" HorizontalAlignment="Center" Width="40">
  13. <TextBlock Text="{Binding Name}" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
  14. </Border>
  15. <TextBox Grid.Column="1" Width="90" HorizontalContentAlignment="Left" Text="{Binding CurrentValue}" ToolTip="{Binding CurrentValue}" Height="30" Tag="None" HorizontalAlignment="Center">
  16. <i:Interaction.Triggers>
  17. <i:EventTrigger EventName="PreviewMouseLeftButtonDown">
  18. <cal:ActionMessage MethodName="SetStepNameValue">
  19. <cal:Parameter Value="{Binding}"/>
  20. </cal:ActionMessage>
  21. </i:EventTrigger>
  22. </i:Interaction.Triggers>
  23. </TextBox>
  24. </StackPanel>
  25. </DataTemplate>
  26. </UserControl.Resources>
  27. <Grid>
  28. <Canvas x:Name="StepName" Width="735" Height="590">
  29. <ListBox ItemsSource="{Binding StepNames}"
  30. Height="500" Canvas.Top="10" Canvas.Left="15" ItemTemplate="{StaticResource StepNameTemplate}">
  31. <ListBox.ItemsPanel>
  32. <ItemsPanelTemplate>
  33. <UniformGrid IsItemsHost="True" Columns="5" Rows="40"/>
  34. </ItemsPanelTemplate>
  35. </ListBox.ItemsPanel>
  36. <ListBox.ItemContainerStyle>
  37. <Style TargetType="ListBoxItem">
  38. <Style.Triggers>
  39. <Trigger Property="IsSelected" Value="True"/>
  40. <Trigger Property="IsMouseOver" Value="True">
  41. <Setter Property="Cursor" Value="Hand"/>
  42. </Trigger>
  43. </Style.Triggers>
  44. </Style>
  45. </ListBox.ItemContainerStyle>
  46. </ListBox>
  47. <Button Width="130" Height="45" Canvas.Left="580" Canvas.Top="530" Content="Close" Style="{StaticResource CommandButton}">
  48. <i:Interaction.Triggers>
  49. <i:EventTrigger EventName="Click">
  50. <cal:ActionMessage MethodName="CloseCommand">
  51. </cal:ActionMessage>
  52. </i:EventTrigger>
  53. </i:Interaction.Triggers>
  54. </Button>
  55. </Canvas>
  56. </Grid>
  57. </UserControl>