RecipeStepSelectDialogView.xaml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <UserControl
  2. x:Class="FurnaceUI.Views.Recipes.RecipeStepSelectDialogView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. d:DesignHeight="450"
  8. d:DesignWidth="300"
  9. mc:Ignorable="d">
  10. <Grid>
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="370"/>
  13. <RowDefinition Height="60"/>
  14. </Grid.RowDefinitions>
  15. <DataGrid
  16. AutoGenerateColumns="False"
  17. CanUserAddRows="False"
  18. CanUserResizeRows="False"
  19. CanUserSortColumns="False"
  20. ItemsSource="{Binding NewSteps, Mode=OneWay}"
  21. SelectedItem="{Binding SelectedStep, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
  22. <DataGrid.Columns>
  23. <DataGridTemplateColumn
  24. Width="80"
  25. Header="StepNo"
  26. IsReadOnly="True">
  27. <DataGridTemplateColumn.CellTemplate>
  28. <DataTemplate>
  29. <StackPanel Orientation="Horizontal">
  30. <TextBlock FontSize="14" Text="{Binding StepNo, UpdateSourceTrigger=PropertyChanged}"/>
  31. </StackPanel>
  32. </DataTemplate>
  33. </DataGridTemplateColumn.CellTemplate>
  34. </DataGridTemplateColumn>
  35. <DataGridTemplateColumn
  36. Width="210"
  37. Header="StepName"
  38. IsReadOnly="True">
  39. <DataGridTemplateColumn.CellTemplate>
  40. <DataTemplate>
  41. <TextBlock
  42. Width="150"
  43. Margin="5,0"
  44. HorizontalAlignment="Left"
  45. VerticalAlignment="Center"
  46. FontFamily="Arial"
  47. FontSize="14"
  48. Foreground="{DynamicResource FG_Black}"
  49. Text="{Binding Name}"
  50. TextWrapping="Wrap"
  51. ToolTip="{Binding RelativeSource={RelativeSource Self}, Path=Text}"/>
  52. </DataTemplate>
  53. </DataGridTemplateColumn.CellTemplate>
  54. </DataGridTemplateColumn>
  55. </DataGrid.Columns>
  56. <DataGrid.RowStyle>
  57. <Style TargetType="DataGridRow">
  58. <Setter Property="Visibility" Value="{Binding IsVisibility}"/>
  59. </Style>
  60. </DataGrid.RowStyle>
  61. </DataGrid>
  62. <Border
  63. Grid.Row="1"
  64. Grid.Column="0"
  65. Margin="4">
  66. <Canvas>
  67. <Button
  68. Canvas.Left="80"
  69. Canvas.Top="10"
  70. Width="90"
  71. Height="35"
  72. Command="{Binding SaveCommand}"
  73. Content="Save"
  74. Style="{StaticResource CommandButton}"/>
  75. <Button
  76. x:Name="TryClose"
  77. Canvas.Left="190"
  78. Canvas.Top="10"
  79. Width="90"
  80. Height="35"
  81. Content="Cancel"
  82. Style="{StaticResource CommandButton}"/>
  83. </Canvas>
  84. </Border>
  85. </Grid>
  86. </UserControl>