UserLoginWindow.xaml 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <Window x:Class="CCDCountWpf.UserLoginWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:CCDCountWpf"
  7. mc:Ignorable="d"
  8. Title="UserLoginWindow" Height="300" Width="450"
  9. WindowStyle="None" AllowsTransparency="True"
  10. WindowStartupLocation="CenterScreen" Icon="/FromImage/mmexport1752891278116.jpg" KeyDown="Window_KeyDown">
  11. <Grid Background="#B2E0E0E0">
  12. <Grid VerticalAlignment="Top" Height="50" Background="#B20092FF">
  13. <Border BorderBrush="Black" BorderThickness="1"/>
  14. <Label Content="用户登录" Foreground="Black" FontSize="20" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  15. </Grid>
  16. <Border Background="#B20092FF"
  17. CornerRadius="8"
  18. BorderBrush="Gray"
  19. BorderThickness="1"
  20. Margin="80,120,80,0" Height="155" VerticalAlignment="Top">
  21. <StackPanel Orientation="Vertical">
  22. <StackPanel Orientation="Horizontal" Height="95">
  23. <StackPanel Orientation="Vertical" Margin="30,0,0,0">
  24. <Label Content="用户名:" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20"/>
  25. <Label Content="密码:" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20"/>
  26. </StackPanel>
  27. <StackPanel Orientation="Vertical">
  28. <TextBox x:Name="UserNameTbx" HorizontalAlignment="Left" Margin="0,15,0,0" Width="120" FontWeight="Bold" FontSize="20" Background="{x:Null}"/>
  29. <PasswordBox x:Name="UserPassTbx" HorizontalAlignment="Left" Margin="0,17,0,0" VerticalAlignment="Top" Width="120" FontWeight="Bold" FontSize="20" Background="{x:Null}" />
  30. </StackPanel>
  31. </StackPanel>
  32. <StackPanel Orientation="Horizontal">
  33. <Button x:Name="UserLoginBtn" Content="登录" BorderThickness="1" HorizontalAlignment="Left" Margin="50,10,10,0" VerticalAlignment="Top" Width="80" Height="40" Background="#B20123FF" FontWeight="Bold" FontSize="20" Foreground="White" Click="UserLoginBtn_Click" Cursor="Hand">
  34. <Button.Template>
  35. <ControlTemplate TargetType="Button">
  36. <Border CornerRadius="5"
  37. Background="{TemplateBinding Background}"
  38. BorderBrush="{TemplateBinding BorderBrush}"
  39. BorderThickness="{TemplateBinding BorderThickness}">
  40. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  41. </Border>
  42. </ControlTemplate>
  43. </Button.Template>
  44. </Button>
  45. <Button x:Name="UserCancelBtn" Content="取消" BorderThickness="1" HorizontalAlignment="Left" Margin="10,10,10,0" VerticalAlignment="Top" Width="80" Height="40" Background="#B20123FF" FontWeight="Bold" FontSize="20" Foreground="White" Click="UserCancelBtn_Click" Cursor="Hand">
  46. <Button.Template>
  47. <ControlTemplate TargetType="Button">
  48. <Border CornerRadius="5"
  49. Background="{TemplateBinding Background}"
  50. BorderBrush="{TemplateBinding BorderBrush}"
  51. BorderThickness="{TemplateBinding BorderThickness}">
  52. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  53. </Border>
  54. </ControlTemplate>
  55. </Button.Template>
  56. </Button>
  57. </StackPanel>
  58. </StackPanel>
  59. <!-- 卡片内容 -->
  60. </Border>
  61. </Grid>
  62. </Window>