Skip to main content

Calculator Class

Represents a calculator.

Namespace: DevExpress.Xpf.Editors

Assembly: DevExpress.Xpf.Core.v24.1.dll

NuGet Package: DevExpress.Wpf.Core


public class Calculator :


The Calculator is shown in the image below:


Create a Calculator

<Window ...

<dxe:Calculator />

Calculator Features

  • Basic Math Functions (add, subtract, multiply, etc.)
  • Memory Operations - store, recall, add (M+) and subtract (M-). The value stored in the calculator’s memory is returned by the Calculator.Memory property.
  • Calculation History - the calculation history is stored by the Calculator.History property.
  • Keyboard Support
  • Configurable Precision - use the Calculator.Precision property to specify the maximum number of digits displayed to the right of the decimal point.
  • Optional Digital Display - use the Calculator.IsDigitalDisplay property to specify whether the calculator has a digital or text display.
  • Customizable Error Text - handle the Calculator.CustomErrorText event to provide a custom error description.
  • Localizable UI

Displayed Value

Use the Value property to get or set the displayed value. After the Value property’s value has been changed, the Calculator.ValueChanged event is fired.

To obtain the text displayed within the calculator, use the Calculator.DisplayText property.

Button Appearance

You can use the CEButtonStyle, DigitButtonStyle, and OperationButtonStyle properties to customize button appearance.

See Also