RecipeView.xaml 5.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <UserControl x:Class="Venus_MainPages.Views.RecipeView"
  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. mc:Ignorable="d"
  7. xmlns:prism="http://prismlibrary.com/"
  8. prism:ViewModelLocator.AutoWireViewModel="True"
  9. xmlns:core="clr-namespace:Aitex.UI.RecipeEditor;assembly=RecipeEditorControl"
  10. xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
  11. d:DesignHeight="450" d:DesignWidth="800" Name="recipeView">
  12. <UserControl.Resources>
  13. <Style TargetType="Button" x:Key="MiddleButton" BasedOn="{StaticResource {x:Type Button}}" />
  14. <Style TargetType="Button"></Style>
  15. </UserControl.Resources>
  16. <i:Interaction.Triggers>
  17. <i:EventTrigger EventName="Loaded">
  18. <i:InvokeCommandAction Command="{Binding LoadedCommand}" CommandParameter="{Binding ElementName=recipeView}"/>
  19. </i:EventTrigger>
  20. </i:Interaction.Triggers>
  21. <Grid>
  22. <Grid.ColumnDefinitions>
  23. <ColumnDefinition Width="300" />
  24. <ColumnDefinition Width="6" />
  25. <ColumnDefinition Width="800*" />
  26. </Grid.ColumnDefinitions>
  27. <Grid Grid.Column="0">
  28. <Grid.RowDefinitions>
  29. <RowDefinition Height="60"/>
  30. <RowDefinition Height="*"/>
  31. </Grid.RowDefinitions>
  32. <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Title}" Padding="5,1">
  33. <StackPanel VerticalAlignment="Bottom">
  34. <StackPanel Orientation="Horizontal">
  35. <Button Content="New" Width="85" Height="30" Style="{StaticResource MiddleButton}" Command="{Binding NewCommand}"/>
  36. <Button Content="Rename" Margin="10,0,0,0" Width="85" Height="30" Style="{StaticResource MiddleButton}" Command="{Binding ReNameCommand}"/>
  37. <Button Content="Delete" Margin="10,0,0,0" Width="85" Height="30" Style="{StaticResource MiddleButton}" Command="{Binding DeleteCommand}"/>
  38. </StackPanel>
  39. <TextBlock Text="Recipe List" Margin="5" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
  40. </StackPanel>
  41. </Border>
  42. <Border Grid.Row="1" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
  43. <TreeView Name="treeViewRcpList" Margin="0,6"
  44. FontSize="14" BorderThickness="1" BorderBrush="Black" Canvas.Top="140" Canvas.Left="4" Opacity="1" Background="LightSteelBlue" AllowDrop="True"
  45. >
  46. <i:Interaction.Triggers>
  47. <i:EventTrigger EventName="MouseRightButtonDown">
  48. <i:InvokeCommandAction Command="{Binding MouseRightButtonDownCommand}" CommandParameter="{Binding ElementName=treeViewRcpList}"/>
  49. </i:EventTrigger>
  50. </i:Interaction.Triggers>
  51. <TreeView.ItemContainerStyle>
  52. <Style TargetType="{x:Type TreeViewItem}">
  53. </Style>
  54. </TreeView.ItemContainerStyle>
  55. </TreeView>
  56. </Border>
  57. </Grid>
  58. <GridSplitter Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Background="Transparent" />
  59. <Grid x:Name="gridDisplay" Grid.Column="2">
  60. <Grid.RowDefinitions>
  61. <RowDefinition Height="40" />
  62. <RowDefinition Height="706*" />
  63. </Grid.RowDefinitions>
  64. <StackPanel Grid.Row="0" Orientation="Horizontal">
  65. <Label Content="{DynamicResource GlobalLableCurrentRecipe}" FontSize="15" Height="31" HorizontalAlignment="Left" HorizontalContentAlignment="Center" Margin="5,3,0,0" Name="label2" VerticalAlignment="Top" FontWeight="Normal" />
  66. <Label Height="31" Margin="22,3,0,0" Name="labelSelectedRecipe" VerticalAlignment="Top" Content="{Binding Path=CurrentRecipeName}" FontSize="15" HorizontalContentAlignment="Left" HorizontalAlignment="Left" FontWeight="Normal" />
  67. <Button Style="{StaticResource MiddleButton}" Height="25" Name="buttonReloadTableRecipe" VerticalAlignment="Top" FontSize="16" Width="80" VerticalContentAlignment="Center" Margin="50,4,0,0" HorizontalAlignment="Right" Content="{DynamicResource GlobalLableButtonReload}" FontWeight="Normal"></Button>
  68. <Button Style="{StaticResource MiddleButton}" Height="25" Name="buttonSaveTableRecipe" FontSize="16" Width="80"
  69. VerticalContentAlignment="Center" Margin="30,4,22,0" HorizontalAlignment="Right" VerticalAlignment="Top" Content="{DynamicResource GlobalLableButtonSave}" FontWeight="Normal"/>
  70. </StackPanel>
  71. <Grid Grid.Row="1">
  72. <core:RecipeEditorControl x:Name="tableRecipeGrid" FontSize="12" BorderThickness="1" BorderBrush="Black" Margin="0,0,0,6" />
  73. </Grid>
  74. </Grid>
  75. </Grid>
  76. </UserControl>