UserLoginWindow.xaml 4.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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="60" Background="#FF1200D1">
  13. <Border BorderBrush="Black" BorderThickness="1"/>
  14. <Label Content="用户登录" Foreground="White" FontSize="20" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  15. <Button x:Name="KeyBoardBtn" Height="60" Background="{x:Null}" Click="KeyBoardBtn_Click" Width="60" HorizontalAlignment="Right">
  16. <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
  17. <Image Source="/FromImage/键盘_白.png" Width="40" Height="40" />
  18. <TextBlock Text="键盘" FontSize="10" FontWeight="Bold" Margin="0,0,0,0" HorizontalAlignment="Center" Foreground="White" />
  19. </StackPanel>
  20. </Button>
  21. </Grid>
  22. <Border Background="#FF0087FF"
  23. CornerRadius="8"
  24. BorderBrush="Gray"
  25. BorderThickness="1"
  26. Margin="80,120,80,0" Height="155" VerticalAlignment="Top">
  27. <StackPanel Orientation="Vertical">
  28. <StackPanel Orientation="Horizontal" Height="95">
  29. <StackPanel Orientation="Vertical" Margin="30,0,0,0">
  30. <Label Content="用户名:" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White"/>
  31. <Label Content="密码:" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White"/>
  32. </StackPanel>
  33. <StackPanel Orientation="Vertical">
  34. <TextBox x:Name="UserNameTbx" HorizontalAlignment="Left" Margin="0,15,0,0" Width="120" FontWeight="Bold" FontSize="20" Background="{x:Null}" GotFocus="UserNameTbx_GotFocus"/>
  35. <PasswordBox x:Name="UserPassTbx" HorizontalAlignment="Left" Margin="0,17,0,0" VerticalAlignment="Top" Width="120" FontWeight="Bold" FontSize="20" Background="{x:Null}" GotFocus="UserPassTbx_GotFocus" />
  36. </StackPanel>
  37. </StackPanel>
  38. <StackPanel Orientation="Horizontal">
  39. <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">
  40. <Button.Template>
  41. <ControlTemplate TargetType="Button">
  42. <Border CornerRadius="5"
  43. Background="{TemplateBinding Background}"
  44. BorderBrush="{TemplateBinding BorderBrush}"
  45. BorderThickness="{TemplateBinding BorderThickness}">
  46. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  47. </Border>
  48. </ControlTemplate>
  49. </Button.Template>
  50. </Button>
  51. <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">
  52. <Button.Template>
  53. <ControlTemplate TargetType="Button">
  54. <Border CornerRadius="5"
  55. Background="{TemplateBinding Background}"
  56. BorderBrush="{TemplateBinding BorderBrush}"
  57. BorderThickness="{TemplateBinding BorderThickness}">
  58. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  59. </Border>
  60. </ControlTemplate>
  61. </Button.Template>
  62. </Button>
  63. </StackPanel>
  64. </StackPanel>
  65. <!-- 卡片内容 -->
  66. </Border>
  67. </Grid>
  68. </Window>