LoginView.xaml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <UserControl x:Class="TeamAAS_VP.Views.User.LoginView"
  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:lex="http://wpflocalizeextension.codeplex.com"
  8. lex:LocalizeDictionary.DesignCulture="zh-CN"
  9. lex:ResxLocalizationProvider.DefaultAssembly="TeamAAS-VP"
  10. lex:ResxLocalizationProvider.DefaultDictionary="Lang"
  11. prism:ViewModelLocator.AutoWireViewModel="True"
  12. FontFamily="{DynamicResource DefaultFont}">
  13. <b:Interaction.Triggers>
  14. <b:EventTrigger EventName="Loaded">
  15. <b:InvokeCommandAction Command="{Binding LoadedCommand}" />
  16. </b:EventTrigger>
  17. </b:Interaction.Triggers>
  18. <Viewbox Stretch="Uniform">
  19. <Grid>
  20. <materialDesign:Card UniformCornerRadius="50"
  21. Width="400"
  22. Margin="0,50,0,50">
  23. <materialDesign:Card.Resources>
  24. <!--<Style TargetType="TextBlock">
  25. <Setter Property="Foreground"
  26. Value="White" />
  27. </Style>-->
  28. </materialDesign:Card.Resources>
  29. <Grid Margin="50">
  30. <Grid.RowDefinitions>
  31. <RowDefinition Height="20*" />
  32. <RowDefinition Height="20*" />
  33. <RowDefinition Height="20*" />
  34. <RowDefinition Height="20*" />
  35. <RowDefinition Height="20*" />
  36. </Grid.RowDefinitions>
  37. <TextBlock Text="{lex:Loc 登录}"
  38. FontSize="32"
  39. HorizontalAlignment="Center" />
  40. <materialDesign:PackIcon Grid.Row="1"
  41. Kind="User"
  42. VerticalAlignment="Center" />
  43. <ComboBox Grid.Row="1"
  44. Height="50"
  45. Margin="20"
  46. materialDesign:HintAssist.Hint="{lex:Loc 用户}"
  47. HorizontalContentAlignment="Left"
  48. Style="{StaticResource MaterialDesignFloatingHintComboBox}"
  49. ItemsSource="{Binding UserNameList}"
  50. SelectedItem="{Binding SelectedUserName}">
  51. </ComboBox>
  52. <materialDesign:PackIcon Grid.Row="2"
  53. Kind="Password"
  54. VerticalAlignment="Center"/>
  55. <PasswordBox Grid.Row="2"
  56. Height="50"
  57. Margin="20,0,20,0"
  58. HorizontalContentAlignment="Left"
  59. Style="{StaticResource MaterialDesignFloatingHintPasswordBox}"
  60. materialDesign:HintAssist.HelperText="{lex:Loc 请输入用户登录密码}"
  61. materialDesign:HintAssist.Hint="{lex:Loc 密码}"
  62. materialDesign:TextFieldAssist.HasClearButton="True"
  63. materialDesign:PasswordBoxAssist.Password="{Binding Path=UserPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True}"/>
  64. <Grid Grid.Row="3"
  65. Height="40"
  66. Margin="20,5,20,0">
  67. <CheckBox Content="{lex:Loc 记住用户}"
  68. Foreground="Black"
  69. Style="{StaticResource MaterialDesignCheckBox}"
  70. HorizontalAlignment="Left"
  71. VerticalAlignment="Center"
  72. IsChecked="{Binding IsRemember}"/>
  73. <Button Content="{lex:Loc 注册}"
  74. HorizontalAlignment="Right"
  75. Background="Transparent"
  76. BorderBrush="Transparent"
  77. Foreground="Black"
  78. Command="{Binding SignUpCommand}"/>
  79. </Grid>
  80. <Button Grid.Row="4"
  81. Margin="20,10"
  82. VerticalAlignment="Top"
  83. materialDesign:ButtonAssist.CornerRadius="10"
  84. Command="{Binding LoginCommand}">
  85. <StackPanel Orientation="Horizontal">
  86. <materialDesign:PackIcon Kind="Login" />
  87. <TextBlock Text="{lex:Loc 登录}"
  88. Margin="20,0,0,0" />
  89. </StackPanel>
  90. </Button>
  91. </Grid>
  92. </materialDesign:Card>
  93. </Grid>
  94. </Viewbox>
  95. </UserControl>