question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proposal: Add IsReadOnly / IsValueLocked property to NumberBox

See original GitHub issue

The NumberBox control is very useful.

In many cases I want to make the property that’s bound to it’s ValueProperty unchangeable, keeping it readable, which is what the IsReadOnly property does with the TextBox control.

If it had an event like the TextChanging event of TextBox, there could be a work around, but it doesn’t have that.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:6
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
mdmoziburcommented, Sep 2, 2020

How about some kind of lock icon that will be visible when it is locked? Like this:

image

This way user can easily distinguish it with editable NumberBoxes. Besides, if the spin buttons are inlined, then in IsReadOnly mode, those spins buttons won’t be visible anymore. That’s another indicator.

0reactions
robloocommented, Sep 24, 2020

@MuziburRahman It looks nice but no other control uses this convention. I think the lock button should be a proposal for the TextBox to start. Such visual cues should really be uniform in all of WinUI. However, for some controls this convention wouldn’t always work so well – when existing search or calendar icons are present for example.

Read more comments on GitHub >

github_iconTop Results From Across the Web

WinUI - NumberBox
Identifies the PreventKeyboardDisplayOnProgrammaticFocus dependency property. This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found