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"?
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"?