Skip to content

NumericUpDown negative value #4560

@k10admin

Description

@k10admin

Describe the bug

The NumericUpDown control doesn't allow keyboard entry of negative sign when selected culture uses a character other than "-". For example Norwegian CultureInfo.NumberFormat.NegativeSign is "−", a longer dash symbol

Steps to reproduce

Add NumbericUpDown control to a standard window
Configure the project to select Norwegian culture in App.xaml.cs:
CultureInfo.CurrentCulture = CultureInfo.CurrentUICulture = new CultureInfo("nb-nb");

Run project
Select NumericUpDown control and type "-" character
Nothing happens
Copy/paste of correct longer dash character also doesn't work.

Expected behavior

Support keyboard entry of negative character regardless of specific culture character symbol.

Actual behavior

Currently the number has to be entered first, then move caret to start of number & enter the negative symbol.

Environment

MahApps.Metro version: v3.0.0-rc0529
Windows build number: Win11 25H2
Visual Studio: 2026 18.3
Target Framework: net10.0-windows

Screenshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions