Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#22333·Avalonia

MaskedTextBox: Insert key mode, 0-5 & Hexadecimal mask characters

Author: Russell-BeachCreated Sep 27, 2026Updated Sep 27, 2026
Labelsenhancement

Is your feature request related to a problem? Please describe.

MaskedTextBox does not feature a way to force insert key mode behavior, similar to behavior already seen when typing overtop PromptChar or xceed's WPF masked text box InsertKeyMode, which enhances text replacement input in some situations when using MaskedTextBox

As well, the masked text box does not feature input filters when entering digits 0 to 5, or entering hexadecimal digits. A mask for 0-5 could be helpful when trying to make a fast input for times using a masked text box without wanting to use a TimePicker, while hexadecimal input is helpful for entering hexadecimal.

Describe the solution you'd like

Introduce a "InsertKeyMode" property for MaskedTextBox that allows for adjusting input to follow default keyboard behavior, insert mode, or overwrite mode.

Introduce mask characters "5, f, F" to MaskedTextBox with the following characteristics: 5: Digit, required. This element will accept any single digit between 0 and 5. f: Hexadecimal character or space, optional. F: Hexadecimal, required. This element will accept any single hexadecimal digit between 0 and F.

Describe alternatives you've considered

No response

Additional context

Perhaps a better long term solution for additional mask characters could be introducing a way for users to create their own with their own defined rules? If a solution for that already exists, then it needs better documentation as I could not find any way to do such when looking at the docs.

Source: AvaloniaUI/Avalonia

View original on GitHubView discussion on GitHub