Class
CalculatorBase

Represents a base class for calculator controls.

Definition

Namespace:Telerik.Windows.Controls.Calculator

Assembly:Telerik.Windows.Controls.Input.dll

Syntax:

cs-api-definition
public class CalculatorBase : Control, IDisposable

Inheritance: objectCalculatorBase

Derived Classes: RadCalculatorRadCalculatorPicker

Implements: IDisposable

Constructors

CalculatorBase()

Declaration

cs-api-definition
public CalculatorBase()

Fields

DecimalSeparatorProperty

Identifies the DecimalSeparator dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty DecimalSeparatorProperty

Field Value

DependencyProperty

HistoryProperty

Identifies the DecimalSeparator dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty HistoryProperty

Field Value

DependencyProperty

HistoryPropertyKey

Identifies the History dependency property.

Declaration

cs-api-definition
public static readonly DependencyPropertyKey HistoryPropertyKey

Field Value

DependencyPropertyKey

MemoryButtonsVisibilityProperty

Identifies the MemoryButtonsVisibility dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty MemoryButtonsVisibilityProperty

Field Value

DependencyProperty

MemoryValueProperty

Identifies the MemoryValue dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty MemoryValueProperty

Field Value

DependencyProperty

OperationsProperty

Identifies the Operations dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty OperationsProperty

Field Value

DependencyProperty

PendingOperationProperty

Identifies the PendingOperation dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty PendingOperationProperty

Field Value

DependencyProperty

ValueProperty

Identifies the Value dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ValueProperty

Field Value

DependencyProperty

Properties

DecimalSeparator

Gets decimal separator depending on the current culture.

Declaration

cs-api-definition
public string DecimalSeparator { get; set; }

Property Value

string

ErrorMessage

Gets or sets the error message.

Declaration

cs-api-definition
public string ErrorMessage { get; set; }

Property Value

string

The error message.

History

Gets the history.

Declaration

cs-api-definition
public string History { get; }

Property Value

string

MemoryButtonsVisibility

Gets or sets calculator's memory buttons visibility.

Declaration

cs-api-definition
public Visibility MemoryButtonsVisibility { get; set; }

Property Value

Visibility

The MemoryButtonsVisibility.

MemoryValue

Gets CalculatorBase's current memory value.

Declaration

cs-api-definition
public decimal? MemoryValue { get; set; }

Property Value

decimal?

Operations

Gets or sets calculator's operations source.

Declaration

cs-api-definition
public OperationsSource Operations { get; set; }

Property Value

OperationsSource

The operations.

Value

Gets CalculatorBase's current calculated value.

Declaration

cs-api-definition
public decimal Value { get; set; }

Property Value

decimal

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration

cs-api-definition
public void Dispose()

Implements IDisposable.Dispose()

Dispose(bool)

Releases unmanaged and - optionally - managed resources.

Declaration

cs-api-definition
protected virtual void Dispose(bool disposing)

Parameters

disposing

bool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

OnMouseLeftButtonDown(MouseButtonEventArgs)

Invoked when an unhandled  routed event is raised on this element. Implement this method to add class handling for this event.

Declaration

cs-api-definition
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)

Parameters

e

MouseButtonEventArgs

The MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was pressed.

OnValueChanged(decimal, decimal)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnValueChanged(decimal oldValue, decimal newValue)

Parameters

oldValue

decimal

newValue

decimal

RegisterCommands()

Registers the used CalculatorBaseCommands.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
public static void RegisterCommands()

Events

ValueChanged

Occurs when the calculator's value is changed.

Declaration

cs-api-definition
public event EventHandler<ValueChangedEventArgs> ValueChanged

Event Value

EventHandler<ValueChangedEventArgs>