Hi All:
I have a password control box and there is small grid keybaord to enter password, issue is that the moment when i click on the button to enter the password, the cursor deosn't move after password box content
.
How can i set the cursor in the password box after the content got enterted by button click? in my case the cursor is set before the content.
private void bkletter_Click(object sender, RoutedEventArgs e)
{
ppassword.Password = ppassword.Password + "K";
FocusManager.SetFocusedElement(this, ppassword);
}
<PasswordBox Name="ppassword" HorizontalAlignment="Left" Margin="111,50,0,0" FocusManager.IsFocusScope="True"
VerticalAlignment="Top" Height="33" Width="249" PasswordChar="*" FontSize="25" KeyDown="ppassword_KeyDown" />
<Button Content="K" Name="bkletter" Grid.Row="0" Grid.Column="0"
VerticalAlignment="Top" Width="81" Height="44" IsCancel="True" FontSize="28" Background="White" Click="bkletter_Click" >
<Button.Effect>
<DropShadowEffect/>
</Button.Effect>
</Button>