CalculatePalletPos.xaml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. <UserControl x:Class="TeamAAS_VP.Views.Product.CalculatePalletPos"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:prism="http://prismlibrary.com/"
  5. xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
  6. xmlns:system="clr-namespace:System;assembly=mscorlib"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:vm="clr-namespace:TeamAAS_VP.ViewModels.Product"
  10. xmlns:lex="http://wpflocalizeextension.codeplex.com"
  11. lex:LocalizeDictionary.DesignCulture="zh-CN"
  12. lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
  13. lex:ResxLocalizationProvider.DefaultDictionary="Lang"
  14. prism:ViewModelLocator.AutoWireViewModel="True"
  15. mc:Ignorable="d"
  16. d:DataContext="{d:DesignInstance Type=vm:CalculatePalletPosViewModel}"
  17. d:Height="600"
  18. d:Width="1024"
  19. d:Background="White"
  20. FontFamily="{DynamicResource DefaultFont}">
  21. <Grid Margin="0"
  22. MinWidth="300"
  23. MinHeight="200">
  24. <Grid.RowDefinitions>
  25. <RowDefinition Height="300" />
  26. <RowDefinition />
  27. <RowDefinition />
  28. </Grid.RowDefinitions>
  29. <Grid.ColumnDefinitions>
  30. <ColumnDefinition Width="100" />
  31. <ColumnDefinition Width="300" />
  32. </Grid.ColumnDefinitions>
  33. <Canvas x:Name="canvas"
  34. Grid.Row="0"
  35. Grid.Column="1"
  36. Width="300"
  37. Height="300"
  38. Background="White" />
  39. <StackPanel Grid.Row="0"
  40. VerticalAlignment="Center"
  41. Grid.Column="0"
  42. Orientation="Vertical">
  43. <TextBox Text="{Binding RowSpace}"
  44. MinWidth="80"
  45. HorizontalContentAlignment="Center"
  46. materialDesign:HintAssist.Hint="{lex:Loc 间距}"
  47. Style="{StaticResource MaterialDesignFloatingHintTextBox}" />
  48. <Button Content="{lex:Loc 计算,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}P2'}"
  49. Margin="0,20"
  50. Command="{Binding CalculateP2Command}" />
  51. </StackPanel>
  52. <StackPanel Grid.Row="1"
  53. VerticalAlignment="Center"
  54. Grid.Column="1"
  55. Orientation="Horizontal">
  56. <TextBox Text="{Binding ColSpace}"
  57. MinWidth="80"
  58. HorizontalContentAlignment="Center"
  59. materialDesign:HintAssist.Hint="{lex:Loc 间距}"
  60. Style="{StaticResource MaterialDesignFloatingHintTextBox}"
  61. Margin="20,0" />
  62. <Button Content="{lex:Loc 计算,Converter={StaticResource StringFormatConverter},ConverterParameter='{}{0}P1'}"
  63. Command="{Binding CalculateP1Command}" />
  64. </StackPanel>
  65. <StackPanel Grid.Row="2"
  66. Grid.ColumnSpan="2"
  67. Margin="10,10"
  68. Orientation="Horizontal"
  69. HorizontalAlignment="Right">
  70. <Button Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
  71. IsDefault="True"
  72. FontSize="16"
  73. Style="{StaticResource MaterialDesignFlatButton}"
  74. Content="{lex:Loc 确定}">
  75. <Button.CommandParameter>
  76. <system:Boolean>True</system:Boolean>
  77. </Button.CommandParameter>
  78. </Button>
  79. <Button Margin="8,0,0,0"
  80. Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
  81. IsCancel="True"
  82. FontSize="16"
  83. Visibility="{Binding IsCancel,Converter={StaticResource BooleanToVisibilityConverter}}"
  84. Style="{StaticResource MaterialDesignFlatButton}"
  85. Content="{lex:Loc 取消}">
  86. <Button.CommandParameter>
  87. <system:Boolean>False</system:Boolean>
  88. </Button.CommandParameter>
  89. </Button>
  90. </StackPanel>
  91. <materialDesign:Snackbar Grid.Row="2"
  92. Grid.Column="0"
  93. Grid.ColumnSpan="2"
  94. x:Name="SnackbarSeven"
  95. Opacity="0.8"
  96. HorizontalContentAlignment="Center"
  97. MessageQueue="{materialDesign:MessageQueue}"
  98. VerticalAlignment="Bottom" />
  99. </Grid>
  100. </UserControl>