Skip to content

Commit 381e72d

Browse files
committed
使用密码框锁定时,输入法为中文的问题
1 parent 4da2615 commit 381e72d

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/ComputerLock/WindowBlankScreen.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
AllowsTransparency="True"
1212
Height="450"
1313
Width="800"
14+
InputMethod.IsInputMethodEnabled="False"
15+
InputMethod.PreferredImeState="Off"
1416
Loaded="Window_Loaded"
1517
KeyDown="Window_KeyDown"
1618
Closing="Window_Closing">

src/ComputerLock/WindowLockScreen.xaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
ShowInTaskbar="False"
1212
Height="450"
1313
Width="800"
14+
InputMethod.IsInputMethodEnabled="False"
15+
InputMethod.PreferredImeState="Off"
1416
Loaded="Window_Loaded"
1517
SizeChanged="Window_SizeChanged"
1618
Closing="Window_Closing"
@@ -55,7 +57,7 @@
5557
VerticalAlignment="Top"
5658
Margin="2"
5759
Visibility="Collapsed" />
58-
60+
5961
<Border MouseDown="PasswordBlock_MouseDown"
6062
x:Name="PasswordBlock"
6163
Width="230"
@@ -87,11 +89,13 @@
8789
Foreground="#000000"
8890
Opacity="0.5"/>
8991
<PasswordBox PasswordChanged="TxtPassword_PasswordChanged"
90-
KeyDown="TxtPassword_KeyDown"
92+
KeyDown="TxtPassword_KeyDown"
9193
x:Name="TxtPassword"
9294
Grid.Row="2"
93-
Grid.Column="0"
95+
Grid.Column="0"
9496
Grid.ColumnSpan="3"
97+
InputMethod.IsInputMethodEnabled="False"
98+
InputMethod.PreferredImeState="Off"
9599
Style="{StaticResource CustomPasswordBoxStyle}"/>
96100
</Grid>
97101
</Border>

0 commit comments

Comments
 (0)