I have a DataGridTemplateColumn with DataTemplate as a PasswordBox.
I want to warn user if CapsLock is toggled.
private void PasswordBox_PasswordChanged(object sender, RoutedEventArgs e)
{
if (Keyboard.GetKeyStates(Key.CapsLock) == KeyStates.Toggled)
{
...
Now, I need to raise some PopUp here. I don't know how to do this. Help me please.
I tried to play around with ToolTip like this:
((PasswordBox)sender).SetValue(ToolTipService.InitialShowDelayProperty, 1);
((PasswordBox)sender).ToolTip = "CAPS LOCK";
But it works only when mouse cursor hovers there and I need an independent Popup.