Open MaxwellDAssistek opened 1 month ago
Do either of the following work?
<NumericUpDown TextInputOptions.ContentType="Numeric" />
Or
<Style Selector="NumericUpDown /template/ TextBox#PART_TextBox">
<Setter Property="(TextInputOptions.ContentType)" Value="Numeric" />
</Style>
This seems like it should be default behavior, so leave the issue open for maintainers to evaluate unless it's fixed in nightly.
Yes. Current behavior is expected. You need to set TextInputOptions.ContentType if you want to make an effect on a keyboard type.
But it also makes sense to override default value on the NumericUpDown.
TextInputOptions.ContentType="Numeric"
does work, but it would be nice if NumericUpDown
had a sensible default.
@MaxwellDAssistek as Max said we are open for a change here of the default. In case you want to file a PR for it.
I'd like to also note that TextInputOptions
does not show up in the attribute autocomplete (at least in Rider). So it is very challenging to figure this out.
TextInputOptions
sets attached properties, so the tooling autocomplete is more difficult than it is with dependency properties. It's somewhat analogous to extension methods where any class could "add" members (methods or metadata properties) to another.
Describe the bug
When using a NumericUpDown control, Avalonia incorrectly shows the full virtual keyboard instead of showing a numeric only virtual keyboard.
Screenshot
![image](https://github.com/AvaloniaUI/Avalonia/assets/61429558/70f797c4-f680-4faa-905f-4dff542308d2)To Reproduce
<NumericUpDown />
Expected behavior
Tapping the NumericUpDown control should present the numeric-only virtual keyboard.
Avalonia version
11.0.10
OS
Android
Additional context
No response