AddProduct.xaml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <UserControl x:Class="TeamAAS_VP.Controls.AddProduct"
  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. xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
  7. xmlns:system="clr-namespace:System;assembly=mscorlib"
  8. xmlns:local="clr-namespace:TeamAAS_VP.Controls"
  9. xmlns:lex="http://wpflocalizeextension.codeplex.com"
  10. lex:LocalizeDictionary.DesignCulture="zh-CN"
  11. lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
  12. lex:ResxLocalizationProvider.DefaultDictionary="Lang"
  13. mc:Ignorable="d"
  14. d:DesignHeight="250"
  15. d:DesignWidth="400"
  16. d:Background="White"
  17. FontFamily="{DynamicResource DefaultFont}">
  18. <Grid Margin="16">
  19. <Grid.RowDefinitions>
  20. <RowDefinition Height="auto" />
  21. <RowDefinition Height="*" />
  22. <RowDefinition Height="auto" />
  23. </Grid.RowDefinitions>
  24. <TextBlock Text="{Binding Title}"
  25. FontSize="16"
  26. FontWeight="Bold"
  27. Margin="0,10"
  28. VerticalAlignment="Center"
  29. TextAlignment="Left"
  30. HorizontalAlignment="Left" />
  31. <TextBox x:Name="txtName"
  32. Grid.Row="1"
  33. Margin="0,5"
  34. materialDesign:HintAssist.Hint="{Binding Item}"
  35. FontSize="14"
  36. Style="{StaticResource MaterialDesignFloatingHintTextBox}"
  37. Text="{Binding ProductName}">
  38. </TextBox>
  39. <StackPanel Grid.Row="2"
  40. Margin="0,10"
  41. Orientation="Horizontal">
  42. <Button Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
  43. CommandParameter="{Binding ElementName=txtName,Path=Text}"
  44. IsDefault="True"
  45. Style="{StaticResource MaterialDesignFlatButton}"
  46. Content="{lex:Loc 确定}">
  47. </Button>
  48. <Button Margin="10,0"
  49. Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
  50. IsCancel="True"
  51. Style="{StaticResource MaterialDesignFlatButton}"
  52. Content="{lex:Loc 取消}">
  53. <Button.CommandParameter>
  54. <x:Null />
  55. </Button.CommandParameter>
  56. </Button>
  57. </StackPanel>
  58. </Grid>
  59. </UserControl>