LoginView.xaml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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" Closed="Window_Closed">
  14. <Viewbox>
  15. <Grid x:Name="grid1">
  16. <Image x:Name="image1" Source="Pack://application:,,,/Venus_Themes;Component/Resources/Login.png" Stretch="Fill" Width="1920" Height="1080"/>
  17. <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">
  18. <Grid Margin="50 0 0 0">
  19. <Grid.RowDefinitions>
  20. <RowDefinition/>
  21. <RowDefinition/>
  22. <RowDefinition/>
  23. <RowDefinition Height="30"/>
  24. <RowDefinition/>
  25. <RowDefinition Height="30"/>
  26. <RowDefinition/>
  27. <RowDefinition/>
  28. <RowDefinition/>
  29. <RowDefinition/>
  30. </Grid.RowDefinitions>
  31. <Image Source="Pack://application:,,,/Venus_Themes;Component/Resources/JetLogo.png" HorizontalAlignment="Left" Width="154" Height="14"></Image>
  32. <TextBlock Grid.Row="1" Text="Login" FontSize="42" FontFamily="D-DIN" Foreground="#222222" FontWeight="Bold"/>
  33. <TextBlock Grid.Row="2" Text="Welcome back! Please login to your account." FontSize="16" FontFamily="D-DIN" Foreground="#999999"/>
  34. <TextBlock Grid.Row="3" Text="UserName" FontSize="16" FontFamily="D-DIN" Foreground="#666666"/>
  35. <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" KeyDown="UserTextBox_KeyDown" LostFocus="UserTextBox_LostFocus">
  36. <TextBox.Resources>
  37. <VisualBrush x:Key="WaterText" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Center" AlignmentY="Center">
  38. <VisualBrush.Visual>
  39. <TextBlock Text="please enter your name"/>
  40. </VisualBrush.Visual>
  41. </VisualBrush>
  42. <Style TargetType="{x:Type Border}">
  43. <Setter Property="CornerRadius" Value="8"/>
  44. <Setter Property="BorderBrush" Value="#c1d0dc"/>
  45. </Style>
  46. </TextBox.Resources>
  47. <TextBox.Style>
  48. <Style TargetType="TextBox">
  49. <Style.Triggers>
  50. <Trigger Property="Text" Value="{x:Null}">
  51. <Setter Property="Background" Value="{StaticResource WaterText}"/>
  52. </Trigger>
  53. <Trigger Property="Text" Value="">
  54. <Setter Property="Background" Value="{StaticResource WaterText}"/>
  55. </Trigger>
  56. </Style.Triggers>
  57. </Style>
  58. </TextBox.Style>
  59. </TextBox>
  60. <TextBlock Grid.Row="5" Text="Password" FontSize="16" FontFamily="D-DIN" Foreground="#666666"/>
  61. <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">
  62. <customControls:CustomPasswordBox.Resources>
  63. <VisualBrush x:Key="WaterText" TileMode="None" Opacity="0.3" Stretch="None" AlignmentX="Center" AlignmentY="Center">
  64. <VisualBrush.Visual>
  65. <TextBlock Text="please enter your password"/>
  66. </VisualBrush.Visual>
  67. </VisualBrush>
  68. <Style TargetType="{x:Type Border}">
  69. <Setter Property="CornerRadius" Value="8"/>
  70. <Setter Property="BorderBrush" Value="#c1d0dc"/>
  71. </Style>
  72. </customControls:CustomPasswordBox.Resources>
  73. <customControls:CustomPasswordBox.Style>
  74. <Style TargetType="TextBox">
  75. <Style.Triggers>
  76. <Trigger Property="Text" Value="{x:Null}">
  77. <Setter Property="Background" Value="{StaticResource WaterText}"/>
  78. </Trigger>
  79. <Trigger Property="Text" Value="">
  80. <Setter Property="Background" Value="{StaticResource WaterText}"/>
  81. </Trigger>
  82. </Style.Triggers>
  83. </Style>
  84. </customControls:CustomPasswordBox.Style>
  85. </customControls:CustomPasswordBox>
  86. <TextBlock Grid.Row="7" Text="Role" FontSize="16" FontFamily="D-DIN" Foreground="#666666"/>
  87. <!--<customControls:CustomComBobox x:Name="MangerComboBox" Grid.Row="8" Height="40" Width="400" HorizontalAlignment="Left" VerticalAlignment="Top" CustomCornerRadius="4" Margin="0 -30 0 0" SelectedIndex="0" FontSize="16" BorderBrush="Silver" BorderThickness="1">
  88. <ComboBoxItem>Manager</ComboBoxItem>
  89. <ComboBoxItem>Engineer</ComboBoxItem>
  90. <ComboBoxItem>Technician</ComboBoxItem>
  91. <ComboBoxItem>Operator</ComboBoxItem>
  92. </customControls:CustomComBobox>-->
  93. <Border Grid.Row="8" Height="40" Width="400" HorizontalAlignment="Left" VerticalAlignment="Top" CornerRadius="8" Margin="0 -30 0 0" BorderBrush="Silver" BorderThickness="1" Background="White">
  94. <TextBlock FontSize="16" x:Name="roleTextBlock" Text="UnKnow" VerticalAlignment="Center" Padding="20 0 0 0" Foreground="Gray"/>
  95. </Border>
  96. <customControls:PathButton x:Name="loginButton" Grid.Row="9" Width="400" Height="40" Content="Login" Command="{Binding LoginCommand}" HorizontalAlignment="Left" VerticalAlignment="Top" Click="Login_Click" />
  97. </Grid>
  98. </Border>
  99. <userControl:PathButton x:Name="closeButton" Width="15" Height="15" Cursor="Hand"
  100. PathData="{StaticResource Icon_Close}"
  101. Margin="1880 -1000 0 0"
  102. DefaultFillBrush="DimGray"
  103. MouseOverBrush="Red"
  104. IsPressedBrush="Blue" Click="Close_Click"/>
  105. </Grid>
  106. </Viewbox>
  107. </Window>