Override combobox enter key. #16088
Answered
by
workgroupengineering
Quetzalcoatl2435
asked this question in
Q&A
-
The default enter key behaviour for combobox in avalonia 11 is set to open the dropdown list. How can I override this to do something else? |
Beta Was this translation helpful? Give feedback.
Answered by
workgroupengineering
Jun 22, 2024
Replies: 1 comment 2 replies
-
public class MyComboBox:ComboBox
{
protected override Type StyleKeyOverride => typeof(ComboBox); // for reuse the style
protected override void OnKeyDown(KeyEventArgs e)
{
// Your logic
}
} Ref. Avalonia/src/Avalonia.Controls/ComboBox.cs Lines 214 to 266 in 143399f |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
Quetzalcoatl2435
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ref.
Avalonia/src/Avalonia.Controls/ComboBox.cs
Lines 214 to 266 in 143399f