UserLoginWindow.xaml 5.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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="330" Width="450"
  9. WindowStartupLocation="CenterScreen" Icon="/FromImage/mmexport1752891278116.jpg" KeyDown="Window_KeyDown">
  10. <!--WindowStyle="None" AllowsTransparency="True"-->
  11. <Grid Background="#FF2C3E50">
  12. <Grid VerticalAlignment="Top" Height="60" Background="#FF2980B9">
  13. <Border BorderBrush="Black" BorderThickness="1"/>
  14. <Label Content="{DynamicResource UserLogin}" Foreground="White" FontSize="20" VerticalAlignment="Center" HorizontalAlignment="Center"/>
  15. <Button x:Name="SwitchLanguageBtn" Height="60" Width="60" Background="{x:Null}" Click="SwitchLanguageBtn_Click" HorizontalAlignment="Right" Margin="0,0,60,0">
  16. <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
  17. <Image Source="/FromImage/语言_白.png" Width="35" Height="35" Margin="0,2,0,0" />
  18. <TextBlock Text="{DynamicResource SwitchLanguageText}" FontSize="10" FontWeight="Bold" Margin="0,3,0,0" HorizontalAlignment="Center" Foreground="White" />
  19. </StackPanel>
  20. </Button>
  21. <Button x:Name="KeyBoardBtn" Height="60" Background="{x:Null}" Click="KeyBoardBtn_Click" Width="60" HorizontalAlignment="Right">
  22. <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
  23. <Image Source="/FromImage/键盘_白.png" Width="40" Height="40" />
  24. <TextBlock Text="{DynamicResource Keyboard}" FontSize="10" FontWeight="Bold" Margin="0,0,0,0" HorizontalAlignment="Center" Foreground="White" />
  25. </StackPanel>
  26. </Button>
  27. </Grid>
  28. <Border Background="#FF34495E"
  29. CornerRadius="8"
  30. BorderBrush="Gray"
  31. BorderThickness="1"
  32. Margin="80,120,80,0" Height="155" VerticalAlignment="Top">
  33. <StackPanel Orientation="Vertical">
  34. <StackPanel Orientation="Horizontal" Height="95" HorizontalAlignment="Center">
  35. <StackPanel Orientation="Vertical" Margin="0,0,0,0">
  36. <Label Content="{DynamicResource Username}" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White"/>
  37. <Label Content="{DynamicResource Password}" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" FontWeight="Bold" FontSize="20" Foreground="White"/>
  38. </StackPanel>
  39. <StackPanel Orientation="Vertical">
  40. <TextBox x:Name="UserNameTbx" HorizontalAlignment="Left" Margin="0,15,0,0" Width="120" FontWeight="Bold" FontSize="20" Background="{x:Null}" GotFocus="UserNameTbx_GotFocus" Foreground="White"/>
  41. <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" Foreground="White" />
  42. </StackPanel>
  43. </StackPanel>
  44. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  45. <Button x:Name="UserLoginBtn" Content="{DynamicResource Login}" BorderThickness="1" HorizontalAlignment="Center" Margin="0,10,10,0" VerticalAlignment="Top" Width="80" Height="40" Style="{StaticResource BtnColor}" FontWeight="Bold" FontSize="20" Click="UserLoginBtn_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. <Button x:Name="UserCancelBtn" Content="{DynamicResource Cancel}" BorderThickness="1" Margin="10,10,0,0" VerticalAlignment="Top" Width="80" Height="40" Style="{StaticResource BtnColor}" FontWeight="Bold" FontSize="20" Click="UserCancelBtn_Click" Cursor="Hand" HorizontalAlignment="Left">
  58. <Button.Template>
  59. <ControlTemplate TargetType="Button">
  60. <Border CornerRadius="5"
  61. Background="{TemplateBinding Background}"
  62. BorderBrush="{TemplateBinding BorderBrush}"
  63. BorderThickness="{TemplateBinding BorderThickness}">
  64. <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
  65. </Border>
  66. </ControlTemplate>
  67. </Button.Template>
  68. </Button>
  69. </StackPanel>
  70. </StackPanel>
  71. <!-- 卡片内容 -->
  72. </Border>
  73. </Grid>
  74. </Window>