RecipeEditorControl.xaml 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <UserControl x:Class="Aitex.UI.RecipeEditor.RecipeEditorControl"
  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:s="clr-namespace:System;assembly=mscorlib"
  8. xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
  9. xmlns:app="clr-namespace:Aitex.UI.RecipeEditor"
  10. xmlns:xctl="clr-namespace:Xceed.Wpf.Toolkit;assembly=Xceed.Wpf.Toolkit"
  11. xmlns:toolkit="clr-namespace:Xceed.Wpf.Toolkit;assembly=Xceed.Wpf.Toolkit"
  12. xmlns:xctk="http://schemas.xceed.com/wpf/xaml/datagrid"
  13. xmlns:local="clr-namespace:Aitex.UI.RecipeEditor"
  14. d:DesignHeight="452" d:DesignWidth="1201" FontFamily="Arial,SimSun">
  15. <Grid x:Name="grid1">
  16. <Grid.RowDefinitions>
  17. <RowDefinition Height="Auto"/>
  18. <RowDefinition />
  19. </Grid.RowDefinitions>
  20. <Grid.Resources>
  21. <!--<ResourceDictionary>
  22. <ResourceDictionary.MergedDictionaries>
  23. <ResourceDictionary Source="pack://application:,,,/Venus_Themes;component/Styles/Button.xaml"/>
  24. </ResourceDictionary.MergedDictionaries>
  25. </ResourceDictionary>-->
  26. <!--<ResourceDictionary Source="pack://application:,,,/Venus_Themes;component/Styles/Button.xaml"/>-->
  27. <app:CellForeColorConverter x:Key="CellForeColorConverter" />
  28. <app:ErrColorConverter x:Key="ErrColorConverter" />
  29. <app:ErrContentConverter x:Key="ErrContentConverter" />
  30. <app:ErrTooltipConverter x:Key="ErrTooltipConverter" />
  31. <app:RecipeHeadStringConverter x:Key="RecipeHeadStringConverter" />
  32. <app:CellBorderConverter x:Key="cellBorderConverter" />
  33. <app:JumpCellBorderConverter x:Key="jumpCellBorderConverter"/>
  34. <DataTemplate x:Key="columnRedTitleTemplate">
  35. <TextBlock Text="{Binding}" Foreground="Red"/>
  36. </DataTemplate>
  37. <DataTemplate x:Key="columnBlackTitleTemplate">
  38. <TextBlock Text="{Binding}" Foreground="Black"/>
  39. </DataTemplate>
  40. <DataTemplate x:Key="CustomTemplate">
  41. <Border BorderThickness="{Binding IsRunning,Converter={StaticResource cellBorderConverter}}" BorderBrush="Blue">
  42. <TextBlock Text="{Binding Display}" Foreground="{Binding Foreground}" Background="{Binding Background}" ToolTip="{Binding ToolTip}" FontWeight="{Binding FontWeight}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
  43. </Border>
  44. </DataTemplate>
  45. <DataTemplate x:Key="RowHeadTemplate">
  46. <TextBlock Text="{Binding Path=FriendlyName}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Foreground="Black"/>
  47. </DataTemplate>
  48. <xctk:DataGridCollectionViewSource x:Key="recipeData" Source="{Binding RecipeRows}">
  49. <xctk:DataGridCollectionViewSource.GroupDescriptions>
  50. <PropertyGroupDescription PropertyName="CatalogName" />
  51. </xctk:DataGridCollectionViewSource.GroupDescriptions>
  52. </xctk:DataGridCollectionViewSource>
  53. </Grid.Resources>
  54. <Grid Grid.Row="0">
  55. <Expander Grid.Row="1" Header="RecipeHead" FontSize="15" Margin="10,0,0,0">
  56. <WrapPanel x:Name="headStackpanel" Orientation="Horizontal">
  57. </WrapPanel>
  58. </Expander>
  59. </Grid>
  60. <ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
  61. <StackPanel x:Name="stackPanel1" Orientation="Horizontal" Grid.Row="1" ScrollViewer.VerticalScrollBarVisibility="Visible"/>
  62. </ScrollViewer>
  63. </Grid>
  64. </UserControl>