LoginPage.xaml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <UserControl
  2. x:Class="LogoForceTestApp.Modules.MainModule.Views.LoginPage"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:hc="https://handyorg.github.io/handycontrol"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:viewmodels="clr-namespace:LogoForceTestApp.Modules.MainModule.ViewModels"
  9. d:DataContext="{d:DesignInstance Type=viewmodels:LoginPageViewModel}"
  10. d:DesignHeight="450"
  11. d:DesignWidth="800"
  12. mc:Ignorable="d">
  13. <Grid>
  14. <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
  15. <hc:ComboBox
  16. Width="380"
  17. Margin="0,16,0,0"
  18. hc:InfoElement.Necessary="True"
  19. hc:InfoElement.Placeholder="请输入权限"
  20. hc:InfoElement.ShowClearButton="True"
  21. hc:InfoElement.Title="权 限"
  22. hc:InfoElement.TitlePlacement="Left"
  23. hc:InfoElement.TitleWidth="140"
  24. ItemsSource="{Binding Roles}"
  25. SelectedItem="{Binding UserRole}" />
  26. <hc:PasswordBox
  27. Width="380"
  28. Margin="0,16,0,0"
  29. hc:InfoElement.Necessary="True"
  30. hc:InfoElement.Placeholder="请输入密码"
  31. hc:InfoElement.ShowClearButton="True"
  32. hc:InfoElement.Title="密 码"
  33. hc:InfoElement.TitlePlacement="Left"
  34. hc:InfoElement.TitleWidth="140"
  35. IsSafeEnabled="False"
  36. UnsafePassword="{Binding Password}" />
  37. <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
  38. <Button
  39. Width="100"
  40. Margin="0,16,4,0"
  41. Command="{Binding LoginCommand}"
  42. Content="登录"
  43. IsDefault="True" />
  44. <Button
  45. Width="100"
  46. Margin="0,16,4,0"
  47. Command="{Binding GoBackCommand}"
  48. Content="取消" />
  49. </StackPanel>
  50. </StackPanel>
  51. </Grid>
  52. </UserControl>