Class RadCalculatorElement
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadCalculatorElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IImageElement, ITextPrimitive, ITextProvider, ICalculatorElement, ICalculatorButtonElementContainer
Constructors
RadCalculatorElement()
Initializes a new instance of the RadCalculatorElement class.
Declaration
public RadCalculatorElement()
Properties
CalculationBehavior
Gets or sets the calculation behavior.
Declaration
public StandardCalculatorCalculationBehavior CalculationBehavior { get; set; }
Property Value
StandardCalculatorCalculationBehavior
|
ContentElement
Gets the RadCalculatorContentElement, which is responsible for calculator buttons and their layout.
Declaration
public RadCalculatorContentElement ContentElement { get; }
Property Value
RadCalculatorContentElement
|
Culture
Gets or sets current culture for the RadCalculatorElement.
Declaration
public CultureInfo Culture { get; set; }
Property Value
System.Globalization.CultureInfo
|
Implements
TextAreaElement
Gets the RadCalculatorTextAreaElement, which is responsible for the displayed value, memory and history.
Declaration
public RadCalculatorTextAreaElement TextAreaElement { get; }
Property Value
RadCalculatorTextAreaElement
|
Methods
ArrangeOverride(SizeF)
Arranges the RadElement to its final location. The element must call the Arrange method of each of its children.
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
System.Drawing.SizeF
finalSize
The size that is available for element. |
Returns
System.Drawing.SizeF
The rectangle occupied by the element. Usually |
Overrides
Remarks
In this method call to the Arrange method of each child must be made.
CreateCalculationBehavior()
Creates the calculation behavior. responsible for the mathematic operations and history.
Declaration
protected virtual StandardCalculatorCalculationBehavior CreateCalculationBehavior()
Returns
StandardCalculatorCalculationBehavior
|
CreateChildElements()
Called by the element when constructed. Allows inheritors to build the element tree.
Declaration
protected override void CreateChildElements()
Overrides
CreateContentElement()
Creates the RadCalculatorContentElement, which is responsible for calculator buttons and their layout.
Declaration
protected virtual RadCalculatorContentElement CreateContentElement()
Returns
RadCalculatorContentElement
|
CreateTextPartElement()
Creates the RadCalculatorTextAreaElement, which is responsible for the displayed value, memory and history.
Declaration
protected virtual RadCalculatorTextAreaElement CreateTextPartElement()
Returns
RadCalculatorTextAreaElement
|
GetFormattedValue()
Gets the formatted value.
Declaration
protected virtual string GetFormattedValue()
Returns
System.String
|
InitializeFields()
Initializes member fields to their default values. This method is called prior the CreateChildItems one and allows for initialization of members on which child elements depend.
Declaration
protected override void InitializeFields()
Overrides
MeasureOverride(SizeF)
Measures the space required by the RadElement
Used by the layout system.
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
System.Drawing.SizeF
availableSize
The size that is available to the RadElement. The available size can be infinity (to take the full size of the element) |
Returns
System.Drawing.SizeF
The minimum size required by the element to be completely visible. Cannot be infinity. |
Overrides
Remarks
In this method call to the Measure method of each child must be made.
OnButtonMouseUp(RadCalculatorButton, MouseEventArgs)
Executed when a button is mouse up event is fired.
Declaration
public void OnButtonMouseUp(RadCalculatorButton button, MouseEventArgs e)
Parameters
RadCalculatorButton
button
|
System.Windows.Forms.MouseEventArgs
e
|
Implements
OnCalculatorKeyDown(KeyEventArgs)
Executed when a key down event is fired.
Declaration
public void OnCalculatorKeyDown(KeyEventArgs e)
Parameters
System.Windows.Forms.KeyEventArgs
e
|
Implements
OnCalculatorKeyPress(KeyPressEventArgs)
Executed when a key press event is fired.
Declaration
public void OnCalculatorKeyPress(KeyPressEventArgs e)
Parameters
System.Windows.Forms.KeyPressEventArgs
e
|
Implements
OnDisplayValueChanged()
Executed when the display value needs to be updated.
Declaration
public void OnDisplayValueChanged()
Implements
OnDisplayValueChanging(String, String)
Executed when the displayed value is about to be updated. Cancellable.
Declaration
public bool OnDisplayValueChanging(string oldValue, string newValue)
Parameters
System.String
oldValue
The old value. |
System.String
newValue
The new value. |
Returns
System.Boolean
A value indicating whether to cancel the operation. |
Implements
OnHistoryUpdated(String)
Executed when the history text needs to be updated.
Declaration
public void OnHistoryUpdated(string lastAction)
Parameters
System.String
lastAction
|
Implements
OnMemoryUpdated(Boolean)
Executed when the memory is updated.
Declaration
public void OnMemoryUpdated(bool hasMemory)
Parameters
System.Boolean
hasMemory
|
Implements
OnValueChanged()
OnValueChanging(ValueChangingEventArgs)
Fires the ValueChanging event.
Declaration
protected virtual void OnValueChanging(ValueChangingEventArgs args)
Parameters
ValueChangingEventArgs
args
|
ShouldArrangeChild(RadElement)
Gets a value indicating, whether a child will be arranged during the ArrangeOverride.
Declaration
protected override bool ShouldArrangeChild(RadElement child)
Parameters
RadElement
child
The child. |
Returns
System.Boolean
Whether the child will be arranged in ArrangeOverride. |
Overrides
ShouldMeasureChild(RadElement)
Gets a value indicating, whether a child will be measured during the MeasureOverride.
Declaration
protected override bool ShouldMeasureChild(RadElement child)
Parameters
RadElement
child
The child. |
Returns
System.Boolean
Whether the child will be measured in MeasureOverride. |
Overrides
UpdateText()
Updates the displayed text/value.
Declaration
protected virtual void UpdateText()
Events
ValueChanged
Fired when the displayed value has changed.
Declaration
public event EventHandler ValueChanged
Event Type
System.EventHandler
|
ValueChanging
Fired when the display value is about to be changed.
Declaration
public event ValueChangingEventHandler ValueChanging
Event Type
ValueChangingEventHandler
|