CreateProductPage.xaml 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <UserControl x:Class="TeamAAS_VP.Views.Product.CreateProductPage"
  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:b="http://schemas.microsoft.com/xaml/behaviors"
  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:CreateProductPageViewModel}"
  17. d:Background="White"
  18. Name="createpro"
  19. MinWidth="300"
  20. FontFamily="{DynamicResource DefaultFont}">
  21. <b:Interaction.Triggers>
  22. <b:EventTrigger EventName="Loaded">
  23. <b:InvokeCommandAction Command="{Binding LoadedCommand}" />
  24. </b:EventTrigger>
  25. </b:Interaction.Triggers>
  26. <Grid Margin="10">
  27. <Grid.RowDefinitions>
  28. <RowDefinition Height="auto" />
  29. <RowDefinition Height="auto" />
  30. <RowDefinition Height="auto" />
  31. <RowDefinition Height="auto" />
  32. <RowDefinition Height="auto" />
  33. </Grid.RowDefinitions>
  34. <TextBlock Text="{lex:Loc 新建产品}"
  35. FontSize="16" />
  36. <TextBox x:Name="txtName"
  37. Grid.Row="1"
  38. Margin="2,6,2,0"
  39. materialDesign:HintAssist.Hint="{lex:Loc 请输入产品名称}"
  40. FontSize="16"
  41. Style="{StaticResource MaterialDesignFloatingHintTextBox}"
  42. Text="{Binding ProductName,Mode=TwoWay}">
  43. </TextBox>
  44. <ComboBox Grid.Row="3"
  45. Margin="2,10,0,0"
  46. FontSize="16"
  47. materialDesign:HintAssist.Hint="{lex:Loc 模板}"
  48. materialDesign:HintAssist.HelperText="{lex:Loc 选择一个模板}"
  49. Style="{StaticResource MaterialDesignFloatingHintComboBox}"
  50. ItemsSource="{Binding Templates}"
  51. SelectedItem="{Binding SelectTemplate}" />
  52. <StackPanel Grid.Row="4"
  53. Margin="0,20,0,0"
  54. HorizontalAlignment="Center"
  55. Orientation="Horizontal">
  56. <Button FontSize="16"
  57. Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
  58. CommandParameter="{Binding ElementName=createpro,Path=DataContext}"
  59. IsDefault="True"
  60. Style="{StaticResource MaterialDesignFlatButton}"
  61. Content="{lex:Loc 确定}">
  62. </Button>
  63. <Button Margin="8,0,0,0"
  64. FontSize="16"
  65. Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
  66. IsCancel="True"
  67. Style="{StaticResource MaterialDesignFlatButton}"
  68. Content="{lex:Loc 取消}">
  69. <Button.CommandParameter>
  70. <x:Null />
  71. </Button.CommandParameter>
  72. </Button>
  73. </StackPanel>
  74. </Grid>
  75. </UserControl>