Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.Windows.Input.ModifierKeysConverter.GetModifierKeys - NotSupportedException on Preview6 #1033

Closed
Symbai opened this issue Jun 20, 2019 · 2 comments

Comments

@Symbai
Copy link
Contributor

Symbai commented Jun 20, 2019

  • .NET Core Version: 3.0 Preview6
  • Windows version: 10
  • Does the bug reproduce also in WPF for .NET Framework 4.8?: No
  • Does the bug reproduce also in WPF for .NET Core Preview 4: No

Problem description:

<MenuItem Command="ApplicationCommands.Undo" /> crashes with System.NotSupportedException: Unknown ModifierKeys "STRG". While STRG is the German translation of CTRL. Switching back to Preview4 and everything works fine.

Please note that ApplicationCommands.Copy and others, I assume all that uses CTRL, crashes too.

Actual behavior:

"   at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)"

Minimal repo:
You may need to run this with a German Windows version.

<Window
    x:Class="WpfApp3.MainWindow"
    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:local="clr-namespace:WpfApp3"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">
    <Grid>
        <Menu>
            <MenuItem Command="ApplicationCommands.Undo" />
        </Menu>
    </Grid>
</Window>

WpfApp3.zip

@Symbai Symbai changed the title System.Windows.Input.ModifierKeysConverter.GetModifierKeys - NotSupportedException crash on Preview6 System.Windows.Input.ModifierKeysConverter.GetModifierKeys - NotSupportedException on Preview6 Jun 20, 2019
@weltkante
Copy link

This was already fixed by #919 - you can use daily builds as described here or change your resource language to en-US (CultureInfo.CurrentUICulture = CultureInfo.GetCultureInfo("en-US");) until preview 7 is released.

@Symbai
Copy link
Contributor Author

Symbai commented Jun 21, 2019

Thanks!

@Symbai Symbai closed this as completed Jun 21, 2019
@ghost ghost locked as resolved and limited conversation to collaborators Apr 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants