I have a Window which has a Frame containing a Page from another project. I want to get notified if the user presses the Enter button. The problem I'm facing:
When I press the Enter button not the event is triggered but instead the context menu shown in the picture appears. I have tried several things with Focus() and Keyboard.SetFocus() but nothing helped.
The MainWindow is maximized and the WindowStyle is set to none but even when I change it does not change anything. If you need further information feel free to ask.
if (e.Key == Key.Enter)
{
ValidateCredentials();
}