Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Commented Unassigned: Force calculator to calculate [22067]

$
0
0
I'm using the Calculator in a pop-up window. User is able to enter value into textbox. If detailed calculations are required, user can press calculator button and calculator appears (prefilled with any value entered into the textbox). User can then use calculator to manipulate values. Closing the pop-up window I want the resulting value to be pushed back into the textbox.

My problem is that I don't see any way to currently force the calculator to calculate. For example, if the user enters "8", "/", "2", then closes the dialog (not completing the calculation), then the value returned is "2".

I've tried calling

```
Calculator.SetCalculatorButtonType(this.Calculator, Calculator.CalculatorButtonType.Equal);

```
However, I receive a null reference exception in the toolkit.dll when I do.

Is it possible to programmatically force the calculator to "calculate"?
Comments: ** Comment from web user: jkshay **

Thanks for the tip. Using the CalculatorUpDown (of whose existence I was not previously aware) seems to be a much better solution for my scenario.

Currently I'm working on templating the watermark, but I'm curious: Is the template of the textbox available for modification? I'd like to change the font size to match my other textboxes.

Thanks!


Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>