Skip to main content

PopupCalcEdit Class

Represents a calculator displayed within a dropdown window.

Namespace: DevExpress.Xpf.Editors

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

NuGet Package: DevExpress.Wpf.Core

Declaration

public class PopupCalcEdit :
    PopupBaseEdit

Remarks

The PopupCalcEdit is shown in the image below:

PopupCalcEdit

Tip

The PopupCalcEdit class inherits its features from the PopupBaseEdit class.

Refer to the PopupBaseEdit class description for information on derived features and API.

Create a PopupCalcEdit

<Window ...
    xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors">

    <!-- Adds a default PopupCalcEdit to your window -->
    <dxe:PopupCalcEdit />
</Window>

Editor Value

The editor’s value can be specified using the BaseEdit.EditValue or PopupCalcEdit.Value property.

<Window ...
    xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors">

<!-- Specify value using the BaseEdit.EditValue property -->
<dxe:PopupCalcEdit EditValue="0"/>

<!-- Specify value using the PopupCalcEdit.Value property -->
<dxe:PopupCalcEdit Value="0"/>

To respond to changing the editor’s value, handle the BaseEdit.EditValueChanged event. To check the new value’s validity, handle the BaseEdit.Validate event.

Calculation Features

PopupCalcEdit features include:

  • Basic Math Functions (add, subtract, multiply, etc.)
  • Memory Operations - store, recall, add (M+) and subtract (M-).
  • Keyboard and Mouse Wheel Support
  • Configurable Precision - use the PopupCalcEdit.Precision property to specify the maximum number of digits displayed to the right of the decimal point.
  • Customizable Error Text - handle the PopupCalcEdit.CustomErrorText event to provide a custom error description.

Layout

The IsPopupAutoWidth property specifies whether the popup calculator’s width is automatically adjusted to the editor’s width.

See Also