-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Dynamically Create TextBox Issue #940
Comments
Can you give a minimal repository? I run your code in my project and I can not find the exception. My version is 3.0.100-preview5-011568 |
https://github.com/turboyang-cn/wpf-core-test There's no problem with this version. The problem is in the new version (3.0.100-preview6-012264). |
It seems a language issues. The code will call wpf/src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Documents/TextEditorTyping.cs Line 81 in 9afa976
In this code, the wpf/src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/Commands/CommandHelpers.cs Lines 83 to 88 in ae17905
The And the code will use the Chinese word to wpf/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Command/KeyGesture.cs Line 299 in ae17905
I find the value of source in Line 82 in ae17905
And the And the Line 120 in ae17905
And the KeyConverter will call the wpf/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Input/KeyConverter.cs Line 90 in ae17905
And the The wpf/src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Input/KeyConverter.cs Line 220 in ae17905
|
Thank for @ryalanms. And he change - CommandHelpers.RegisterCommandHandler(controlType, EditingCommands.Delete , new ExecutedRoutedEventHandler(OnDelete) , onQueryStatusNYI , SRID.KeyDelete, SRID.KeyDeleteDisplayString );
+ CommandHelpers.RegisterCommandHandler(controlType, EditingCommands.Delete , new ExecutedRoutedEventHandler(OnDelete) , onQueryStatusNYI , KeyDelete, SRID.KeyDeleteDisplayString ); 9afa976#diff-8491c698fe3be6a213b6db468e74c815L81 Because And the |
Errors occurred when I created text boxes dynamically in my code
TextBox TextBox = new TextBox();
The text was updated successfully, but these errors were encountered: