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: BoucherS **

Hi,

You can set the FontSize directly on the CalculatorUpDown :
```
<xctk:CalculatorUpDown Watermark="Data" FontSize="22"/>
```
Or if you want to modify the template, you can find it here :
-Xceed.Wpf.Toolkit/CalculatorUpDown/Themes/Aero2.NormalColor.xaml (For windows8)
-Xceed.Wpf.Toolkit/CalculatorUpDown/Themes/Generic.xaml (For other Windows)


Viewing all articles
Browse latest Browse all 4964

Trending Articles



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