-
Notifications
You must be signed in to change notification settings - Fork 333
Open
Description
I found that the keyboard click event works differently in the main window and in the floating window. It works correctly in the main window, IsRepeat = false is returned on the first press, IsRepeat = true is returned on hold. In a floating window, IsRepeat = true is immediately returned.
I reproduced the behavior on the test program MVVMTestApp.
MainWindow.xaml change line 61
<local:PanesTemplateSelector.FileViewTemplate>
<DataTemplate>
<StackPanel Orientation="Vertical">
<TextBlock Text="FileViewTemplate" />
<TextBox
Background="Transparent"
BorderThickness="0"
Text="{Binding TextContent, UpdateSourceTrigger=PropertyChanged}"
PreviewKeyDown="TextBox_PreviewKeyDown"/>
</StackPanel>
</DataTemplate>
</local:PanesTemplateSelector.FileViewTemplate>
private void TextBox_PreviewKeyDown(object sender, KeyEventArgs e)
{
Debug.WriteLine($"TextBox_PreviewKeyDown. sender={sender?.GetType()?.Name?.ToString()}; OriginalSource={(e.OriginalSource as UIElement)?.GetType()?.Name?.ToString()} Source={e.Source?.GetType()?.Name?.ToString()} Key={e.Key} IsRepeat={e.IsRepeat} Handled={e.Handled}");
}
I found this bug in my program with the xceed 2.5 library, I tried to get around this bug for a long time, but I did not find a solution.
Metadata
Metadata
Assignees
Labels
No labels