From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Measurement Studio - RadixNumericTextBox - Set content to uppercase

Solved!
Go to solution

Good morning,

 

as per topic object I'd like to set the content of a RadixNumbericTextBox to uppercase when selecting Hexadecimal display.

 

I'm currently using MeasurementStudio 2015 WPF controls.

 

Thanks,

Andrea

0 Kudos
Message 1 of 4
(2,286 Views)
Solution
Accepted by topic author Andrea_Angeloni

There is no property to control the capitalization of the text, but you can override the virtual CreateValueFormatter method to set this:

public class UppercaseRadixNumericTextBoxInt32 : RadixNumericTextBoxInt32 {
    protected override RadixValueFormatter CreateValueFormatter( ) {
        var formatter = base.CreateValueFormatter( );
        formatter.Uppercase = true;
        return formatter;
    }
}
~ Paul H
0 Kudos
Message 2 of 4
(2,254 Views)

Thanks for your answer.

 

I'd rather avoid code behind to stick with MVVM pattern, is there any way to do so?

0 Kudos
Message 3 of 4
(2,237 Views)

Sorry, I understand I posted a meaningless answer.

 

Next time, connecting brain before tryping.

 

Your answer solves my problem, thank you.

0 Kudos
Message 4 of 4
(2,220 Views)