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,285 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,253 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,236 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,219 Views)