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.

[Feature request] NumericUpDown with a ValueLabel property

See original GitHub issue

Is your feature request related to a problem? Please describe. Currently NumericUpDown allow a FormatString, but when used with custom text or units, it will mess the value when user edit the value on the box but not when they use the spinner alone, also not pratical and easy to mess up.

Describe the solution you’d like

  • Have a property, like: ValueLabel that allow us to set whatever we want, eg: mm/min.
  • ValueLabelPosition enum(Left, AfterValue, Right), with default to AfterValue

That way we can have a locked text that don’t mess with the input and with good integrated design Here an ugly sample i did, i just put a TextBox disabled after the NumericUpDown to illustrate the solution:

image

image

UVtools_2021-09-13_17-54-22

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
maxkatz6commented, Sep 13, 2021

I forgot to mention, it should be Template object:

<Style Selector="NumericUpDown /template/ TextBox">
        <Setter Property="InnerRightContent">
            <Template>
                <TextBox Text="mm"/>
            </Template>
        </Setter>
    </Style>

For example https://github.com/AvaloniaUI/Avalonia/blob/0b9cd49a11c4ef026d2ed6cf07e7aa718ba5a974/src/Avalonia.Themes.Default/TextBox.xaml#L110

0reactions
sn4k3commented, Jul 5, 2023

Using custom control / classes

Read more comments on GitHub >

github_iconTop Results From Across the Web

NumericUpDown.Value Property (System.Windows.Forms)
When the Value property is set, the new value is validated to be between the Minimum and Maximum values. Following this, the UpdateEditText...
Read more >
NumericUpDown Class (System.Windows.Forms)
Gets or sets a value indicating whether the control causes validation to be performed on any controls that require validation when it receives...
Read more >
How to set value property of NumericUpDown from a string ...
1 Answer 1 · This kind of "Try it and report back" troubleshooting is not really appropriate for SO. · thanks for your...
Read more >
Binding a NumericUpDown control to an object that ...
I have a NumericUpDown control that is bound to an int property on a business object which implements INotifyPropertyChanged.
Read more >
sitemap-forums1.xml
... https://www.syncfusion.com/forums/1526/passwordchar-property-of-text-in-a-datagrid https://www.syncfusion.com/forums/1531/feature-request ...
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