Back to Devexpress

PopupCalcEdit Class

wpf-devexpress-dot-xpf-dot-editors-beef5770.md

latest3.9 KB
Original Source

PopupCalcEdit Class

Represents a calculator displayed within a dropdown window.

Namespace : DevExpress.Xpf.Editors

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
[DXLicenseWpfEditors]
public class PopupCalcEdit :
    PopupBaseEdit
vb
<DXLicenseWpfEditors>
Public Class PopupCalcEdit
    Inherits PopupBaseEdit

Remarks

The PopupCalcEdit is shown in the image below:

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

xaml
<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.

xaml
<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.

Inheritance

Show 13 items

Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control BaseEdit TextEditBase TextEdit ButtonEdit PopupBaseEdit PopupCalcEdit

See Also

PopupCalcEdit Members

DevExpress.Xpf.Editors Namespace