SignUpView.xaml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. <UserControl x:Class="TeamAAS_VP.Views.User.SignUpView"
  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:sys="clr-namespace:System;assembly=mscorlib"
  8. xmlns:enums="clr-namespace:TeamAAS_VP.Enums"
  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. prism:ViewModelLocator.AutoWireViewModel="True"
  14. FontFamily="{DynamicResource DefaultFont}">
  15. <UserControl.Resources>
  16. <ObjectDataProvider x:Key="UserLevelEnum"
  17. MethodName="GetNames"
  18. ObjectType="{x:Type sys:Enum}">
  19. <ObjectDataProvider.MethodParameters>
  20. <x:Type TypeName="enums:UserPart" />
  21. </ObjectDataProvider.MethodParameters>
  22. </ObjectDataProvider>
  23. </UserControl.Resources>
  24. <Viewbox Stretch="Uniform">
  25. <Grid>
  26. <materialDesign:Card UniformCornerRadius="50"
  27. Width="400"
  28. Margin="0,50,0,50">
  29. <materialDesign:Card.Resources>
  30. <!--<Style TargetType="TextBlock">
  31. <Setter Property="Foreground"
  32. Value="White" />
  33. </Style>-->
  34. </materialDesign:Card.Resources>
  35. <Grid Margin="50">
  36. <Grid.RowDefinitions>
  37. <RowDefinition Height="20*" />
  38. <RowDefinition Height="16*" />
  39. <RowDefinition Height="16*" />
  40. <RowDefinition Height="16*" />
  41. <RowDefinition Height="16*" />
  42. <RowDefinition Height="16*" />
  43. </Grid.RowDefinitions>
  44. <TextBlock Text="{lex:Loc 注册}"
  45. FontSize="32"
  46. HorizontalAlignment="Center" />
  47. <TextBox Grid.Row="1"
  48. Margin="20,5"
  49. FontSize="12"
  50. materialDesign:HintAssist.Hint="{lex:Loc 用户名}"
  51. materialDesign:HintAssist.HelperTextFontSize="12"
  52. Style="{StaticResource MaterialDesignOutlinedTextBox}"
  53. Text="{Binding MyUser.UserName}"/>
  54. <PasswordBox Grid.Row="2"
  55. Margin="20,5"
  56. FontSize="12"
  57. materialDesign:HintAssist.HelperText="{lex:Loc 密码}"
  58. materialDesign:HintAssist.Hint="{lex:Loc 密码}"
  59. materialDesign:PasswordBoxAssist.Password="{Binding MyUser.UserPassword, Mode=TwoWay}"
  60. materialDesign:TextFieldAssist.HasClearButton="True"
  61. Style="{StaticResource MaterialDesignOutlinedRevealPasswordBox}" />
  62. <ComboBox Grid.Row="3"
  63. Margin="20,5"
  64. materialDesign:HintAssist.Hint="{lex:Loc 权限}"
  65. Style="{StaticResource MaterialDesignOutlinedComboBox}"
  66. ItemsSource="{Binding Source={StaticResource UserLevelEnum}}"
  67. SelectedItem="{Binding MyUser.userPart}" />
  68. <Button Grid.Row="4"
  69. Margin="20,10"
  70. VerticalAlignment="Top"
  71. materialDesign:ButtonAssist.CornerRadius="10"
  72. Command="{Binding SignUpCommand}">
  73. <StackPanel Orientation="Horizontal">
  74. <materialDesign:PackIcon Kind="Sign" />
  75. <TextBlock Text="{lex:Loc 注册}"
  76. Margin="20,0,0,0" />
  77. </StackPanel>
  78. </Button>
  79. <Button Grid.Row="5"
  80. Width="50"
  81. Background="Transparent"
  82. BorderBrush="Transparent"
  83. materialDesign:ButtonAssist.CornerRadius="10"
  84. Command="{Binding BackupCommand}">
  85. <materialDesign:PackIcon Kind="BackspaceOutline"
  86. Foreground="Black" />
  87. </Button>
  88. </Grid>
  89. </materialDesign:Card>
  90. </Grid>
  91. </Viewbox>
  92. </UserControl>