Declined
Last Updated: 23 Sep 2021 07:58 by ADMIN
Nebojsa Mancic
Created on: 05 Jul 2021 18:48
Category: UI for WPF
Type: Feature Request
0
RadCalculatorPicker format textbox for display number
I think it would be great to configure  RadCalculatorPicker's textbox to change way of displaying number, to add thousands separator and to manage other options to manage result view.
7 comments
ADMIN
Martin Ivanov
Posted on: 23 Sep 2021 07:58

Hello Nebojsa,

You can change the color of the whole number in the textbox area of the RadCalculatorPicker control via its Foreground property. You can change the property based on the Value of the control. One way to do this is to implement an IValueConverter. For example:

public class NumberToBrushConverter : IValueConverter
{
	public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
	{
		double number = System.Convert.ToDouble(value);
		return number >= 0d && number <= 5000d ? Brushes.Green : Brushes.Red;
	}

	public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
	{
		throw new NotImplementedException();
	}
}

 

<telerik:RadCalculatorPicker x:Name="calculatorPicker"
							 Foreground="{Binding ElementName=calculatorPicker, Path=Value, Converter={StaticResource NumberToBrushConverter}}"/>

To change the sign of the value using the N key, you can subscribe to the KeyDown event of the picker and update the Value property accordingly.  I also logged a couple of feature requests for this and for the numeric operator visibility requirement.

I am closing this feature because it contains multiple feature requests. Please follow the items linked in the list above.

Regards,
Martin Ivanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

ADMIN
Martin Ivanov
Posted on: 26 Jul 2021 13:48

Hello Nebojsa,

Thank you for the additional feedback.

Regards,
Martin Ivanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Nebojsa Mancic
Posted on: 19 Jul 2021 15:21

Hello Martin,

 

Hello Martin,

 

- I suggest to change colour of whole number, like conditional formatting - if number greater then zero, or less then 5000 or greater then 5000, not to change colour of each digit.

- display the whole expression instead of showing only the result.,  

 no, in textbox numeric operator should be visible, now it is not. For example, type 1000 and it is displayed, then I press plus sign on keyboard, there should be only "+" in textbox, then I press 3000, there is only 3000 in textbox. When I press enter then I should see only result 4000.

- additionally, I want to change number sign, for example with "N" key pressed, to negate value in textbox and to press Delete key or C  to clear number in textbox.

ADMIN
Martin Ivanov
Posted on: 19 Jul 2021 14:50

Hello Nebojsa,

Thank you for the additional information. Let's see if I understand this correctly with the following summary. You need for the TextBox part of the control to:

  • be able to set the floating number format of the entered number. As in your example, where you want to see two trailing zeroes after the decimal point. This should be doable by setting a string format like "{0:F2}" if such API existed.
  • be able to add thousands separator, so instead of showing (for example) 10000, to show 10,000.
  • be able to type decimal numbers.
  • display the whole expression instead of showing only the result. Note that the idea of the TextBox is mostly to show the result in a simple manner, so showing the full expression will require replacement of the visual element showing the input and also the logic behind it. However, here you can consider an approach with an additional UI element placed near the RadCalculatorPicker which is bound to the History property of the picker. 
  • be able to set color for each separate digit in the TextBox. Here I will need some more context. Do you need to color each digit the text in the TextBox or the color of numbers shown in the History?
  • be able to set maximum number of decimal places for the entered number.

Please correct me if I am wrong.

I wanted to summarize this in order to have it in one place and then to log few separate feature requests where meaningful.

Regards,
Martin Ivanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Nebojsa Mancic
Posted on: 12 Jul 2021 15:31
Yet another one, to  set maximum number of decimal places thah user can enter. Somethnig no more than 3 decimal places.
Nebojsa Mancic
Posted on: 12 Jul 2021 15:28

Hello Martin,

 

It would bi nice to see numbers in RadCalculatorPicker like

123.456,00  if I want to see fraction part as zeroes. Now I can see 123456

 

I think it would be nice to see operator sign when it is pressed.  Something like

123

+

456

Now I can see 123 and 456 but no plus sign, or -, /, *

Those two behaviors are "must have". 

One more,

Simple way to select color for negative, zero and positive numbers, foreground and background

 

Best regards,

 

ADMIN
Martin Ivanov
Posted on: 12 Jul 2021 14:27

Hello Nebojsa,

Can you tell me what other options exactly do you need? Do you mean that you want to be able to provide a NumberFormatInfo that allows different kinds of options?

Regards,
Martin Ivanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.