LoginView.xaml
3.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<Window
x:Class="HHECS.RobotTool.View.AccountView.LoginView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:local="clr-namespace:HHECS.RobotTool.View.AccountView"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:viewmodel="clr-namespace:HHECS.RobotTool.ViewModel.AccountVM"
Title="登录"
Width="750"
Height="360"
d:DataContext="{d:DesignInstance Type=viewmodel:LoginVM}"
AllowsTransparency="True"
WindowStartupLocation="CenterScreen"
WindowStyle="None"
mc:Ignorable="d">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="300" />
</Grid.ColumnDefinitions>
<Image
Grid.Column="0"
HorizontalAlignment="Center"
Source="/Resource/Image/login.jpg"
Stretch="UniformToFill" />
<StackPanel
Grid.Column="1"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<TextBlock
Margin="0,10,0,35"
HorizontalAlignment="Center"
FontSize="38"
FontWeight="Bold"
Foreground="#b71b2b"
Text="HUAHENG" />
<hc:UniformSpacingPanel Orientation="Vertical" Spacing="10">
<hc:ElementGroup
Height="30"
Margin="0,1"
VerticalAlignment="Center"
Layout="Stack">
<Border Padding="6,0" Style="{StaticResource BorderRegion}">
<TextBlock
Width="40"
VerticalAlignment="Center"
Text="账号" />
</Border>
<TextBox Width="150" Text="{Binding Account, UpdateSourceTrigger=PropertyChanged}" />
</hc:ElementGroup>
<hc:ElementGroup
Height="30"
VerticalAlignment="Center"
Layout="Stack">
<Border Padding="6,0" Style="{StaticResource BorderRegion}">
<TextBlock
Width="40"
VerticalAlignment="Center"
Text="密码" />
</Border>
<PasswordBox
x:Name="txt_pwd"
Width="150"
KeyDown="txt_pwd_KeyDown"
MaxLength="16" />
</hc:ElementGroup>
<Button
Command="{Binding CommintCommand}"
Content="登录"
Style="{StaticResource ButtonPrimary}" />
<Button
Command="{Binding CancelCommand}"
Content="取消"
Style="{StaticResource ButtonDefault}" />
</hc:UniformSpacingPanel>
</StackPanel>
</Grid>
</Window>