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

CharacterReceived event is not working in WinUI 3 ComboBox #9786

Closed
Ajith-GS opened this issue Jul 3, 2024 · 1 comment
Closed

CharacterReceived event is not working in WinUI 3 ComboBox #9786

Ajith-GS opened this issue Jul 3, 2024 · 1 comment
Labels
area-ComboBox bug Something isn't working closed-Fixed Described behavior has been fixed. fix-released The fix has been in a release (experimental, preview, stable, or servicing). team-Controls Issue for the Controls team
Milestone

Comments

@Ajith-GS
Copy link

Ajith-GS commented Jul 3, 2024

Describe the bug

The CharacterReceived event is not calling while typing characters in editable ComboBox.
Sample code is given below.

  • XAML
 <ComboBox x:Name="TEST" IsEditable="True" CharacterReceived="ComboBox_CharacterReceived" >
     <x:String>123</x:String>
     <x:String>234</x:String>
     <x:String>125</x:String>
 </ComboBox>
  • C++
void winrt::TestApp::implementation::MainWindow::ComboBox_CharacterReceived( winrt::Microsoft::UI::Xaml::UIElement const& sender, winrt::Microsoft::UI::Xaml::Input::CharacterReceivedRoutedEventArgs const& args )
{
    OutputDebugString( (L"\nComboBox_CharacterReceived" );
}

Is there any additional stuff We should do to trigger this event?
Any help is greatly appreciated.

Steps to reproduce the bug

Create a C++ WinUI3 application.
Add a ComboBox control in XAML.
Add CharacterReceived event.
Put OutputDebugString inside the CharacterReceived handler.

Expected behavior

While typing characters, the CharacterReceived event should be triggered each time.

Screenshots

No response

NuGet package version

Windows App SDK 1.5.4: 1.5.240607001

Packaging type

Packaged (MSIX)

Windows version

Windows 10 version 22H2 (19045, 2022 Update)

IDE

Visual Studio 2022

Additional context

No response

@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Jul 3, 2024
@codendone codendone transferred this issue from microsoft/WindowsAppSDK Jul 3, 2024
@codendone codendone added bug Something isn't working area-ComboBox team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Jul 3, 2024
@jususnja-ms
Copy link

jususnja-ms commented Jul 12, 2024

I have a similar problem. But seems to me that character received works for some elements and for some it doesn't. It doesn't get invoked for Window element or for TextBox. But it did get invoked for Button.
Ideally, I would like to make it work for Window element somehow.

@llongley llongley added this to the WinAppSDK 1.6 milestone Jul 18, 2024
@llongley llongley added the closed-Fixed Described behavior has been fixed. label Jul 18, 2024
@codendone codendone added the fix-released The fix has been in a release (experimental, preview, stable, or servicing). label Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-ComboBox bug Something isn't working closed-Fixed Described behavior has been fixed. fix-released The fix has been in a release (experimental, preview, stable, or servicing). team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests

4 participants