LoginView.xaml 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <Window x:Class="Venus_MainPages.Views.LoginView"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:Venus_MainPages.Views"
  7. WindowStyle="None" AllowsTransparency="True" Background="Transparent"
  8. mc:Ignorable="d"
  9. ResizeMode="NoResize"
  10. xmlns:userControl="clr-namespace:Venus_Themes.UserControls;assembly=Venus_Themes"
  11. xmlns:customControls="clr-namespace:Venus_Themes.CustomControls;assembly=Venus_Themes"
  12. WindowStartupLocation="CenterScreen"
  13. Width="1920" Height="1080">
  14. <Grid>
  15. <Image Source="Pack://application:,,,/Venus_Themes;Component/Resources/Login.png" Stretch="Fill"/>
  16. <Border Width="500" Height="650" Background="#FFFFFF" Margin="100 200 0 0" HorizontalAlignment="Left" VerticalAlignment="Top" BorderThickness="1" BorderBrush="Silver" CornerRadius="15,15,15,15">
  17. <Grid Margin="50 0 0 0">
  18. <Grid.RowDefinitions>
  19. <RowDefinition/>
  20. <RowDefinition/>
  21. <RowDefinition/>
  22. <RowDefinition Height="30"/>
  23. <RowDefinition/>
  24. <RowDefinition Height="30"/>
  25. <RowDefinition/>
  26. <RowDefinition/>
  27. <RowDefinition/>
  28. <RowDefinition/>
  29. </Grid.RowDefinitions>
  30. <Image Source="Pack://application:,,,/Venus_Themes;Component/Resources/JetLogo.png" HorizontalAlignment="Left" Width="154" Height="14"></Image>
  31. <TextBlock Grid.Row="1" Text="Login" FontSize="42" FontFamily="D-DIN" Foreground="#222222" FontWeight="Bold"/>
  32. <TextBlock Grid.Row="2" Text="Welcome back! Please login to your account." FontSize="16" FontFamily="D-DIN" Foreground="#999999"/>
  33. <TextBlock Grid.Row="3" Text="UserName" FontSize="16" FontFamily="D-DIN" Foreground="#666666"/>
  34. <TextBox x:Name="UserTextBox" Grid.Row="4" Height="40" Width="400" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="16" VerticalContentAlignment="Center" Padding="20 0 0 0" Foreground="Gray" Text="admin" KeyDown="UserTextBox_KeyDown">
  35. <TextBox.Resources>
  36. <VisualBrush x:Key="WaterText" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Center" AlignmentY="Center">
  37. <VisualBrush.Visual>
  38. <TextBlock Text="please enter your name"/>
  39. </VisualBrush.Visual>
  40. </VisualBrush>
  41. <Style TargetType="{x:Type Border}">
  42. <Setter Property="CornerRadius" Value="8"/>
  43. <Setter Property="BorderBrush" Value="#c1d0dc"/>
  44. </Style>
  45. </TextBox.Resources>
  46. <TextBox.Style>
  47. <Style TargetType="TextBox">
  48. <Style.Triggers>
  49. <Trigger Property="Text" Value="{x:Null}">
  50. <Setter Property="Background" Value="{StaticResource WaterText}"/>
  51. </Trigger>
  52. <Trigger Property="Text" Value="">
  53. <Setter Property="Background" Value="{StaticResource WaterText}"/>
  54. </Trigger>
  55. </Style.Triggers>
  56. </Style>
  57. </TextBox.Style>
  58. </TextBox>
  59. <TextBlock Grid.Row="5" Text="Password" FontSize="16" FontFamily="D-DIN" Foreground="#666666"/>
  60. <customControls:CustomPasswordBox x:Name="PassWordTextBox" Grid.Row="6" Height="40" Width="400" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="16" VerticalContentAlignment="Center" Padding="20 5 0 0" Foreground="Gray" KeyDown="PassWordTextBox_KeyDown">
  61. <customControls:CustomPasswordBox.Resources>
  62. <VisualBrush x:Key="WaterText" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Center" AlignmentY="Center">
  63. <VisualBrush.Visual>
  64. <TextBlock Text="please enter your password"/>
  65. </VisualBrush.Visual>
  66. </VisualBrush>
  67. <Style TargetType="{x:Type Border}">
  68. <Setter Property="CornerRadius" Value="8"/>
  69. <Setter Property="BorderBrush" Value="#c1d0dc"/>
  70. </Style>
  71. </customControls:CustomPasswordBox.Resources>
  72. <customControls:CustomPasswordBox.Style>
  73. <Style TargetType="TextBox">
  74. <Style.Triggers>
  75. <Trigger Property="Text" Value="{x:Null}">
  76. <Setter Property="Background" Value="{StaticResource WaterText}"/>
  77. </Trigger>
  78. <Trigger Property="Text" Value="">
  79. <Setter Property="Background" Value="{StaticResource WaterText}"/>
  80. </Trigger>
  81. </Style.Triggers>
  82. </Style>
  83. </customControls:CustomPasswordBox.Style>
  84. </customControls:CustomPasswordBox>
  85. <TextBlock Grid.Row="7" Text="Role" FontSize="16" FontFamily="D-DIN" Foreground="#666666"/>
  86. <ComboBox x:Name="MangerComboBox" Grid.Row="8" Height="40" Width="400" HorizontalAlignment="Left" VerticalAlignment="Top" Style="{StaticResource customeComboBoxStyle2}" Margin="0 -30 0 0" SelectedIndex="0" FontSize="16">
  87. <ComboBoxItem>Manager</ComboBoxItem>
  88. <ComboBoxItem>Engineer</ComboBoxItem>
  89. <ComboBoxItem>Technician</ComboBoxItem>
  90. <ComboBoxItem>Operator</ComboBoxItem>
  91. </ComboBox>
  92. <customControls:PathButton Grid.Row="9" Width="400" Height="40" Content="Login" Command="{Binding LoginCommand}" HorizontalAlignment="Left" VerticalAlignment="Top" Click="Login_Click" />
  93. </Grid>
  94. </Border>
  95. <userControl:PathButton Width="15" Height="15" Cursor="Hand"
  96. PathData="{StaticResource Icon_Close}"
  97. Margin="1880 -1000 0 0"
  98. DefaultFillBrush="White"
  99. MouseOverBrush="Yellow"
  100. IsPressedBrush="Blue" Click="Close_Click"/>
  101. </Grid>
  102. </Window>