Class DoubleTextBox
Extends the System.Windows.Forms.TextBox class to handle double input
and validation.
Inheritance
System.Object
DoubleTextBox
Implements
System.ComponentModel.ISupportInitialize
System.Runtime.Serialization.ISerializable
Assembly: Syncfusion.Shared.Base.dll
Syntax
public class DoubleTextBox : NumericTextBox, IThemeProvider, IVisualStyle, ISupportInitialize, ISerializable
Constructors
DoubleTextBox()
Overloaded. Creates an object of type DoubleTextBox.
Declaration
Properties
AccessibilityEnabled
Gets or sets a value indicating whether the control should enable its Accessibility support.
Declaration
public bool AccessibilityEnabled { get; set; }
Property Value
DoubleValue
Gets or sets the double value of the control. This will be formatted and
displayed.
Declaration
public double DoubleValue { get; set; }
Property Value
HideTrailingZeros
Declaration
public bool HideTrailingZeros { get; set; }
Property Value
MaxValue
Gets or sets the maximum value that can be set through the DoubleTextBox.
Declaration
public double MaxValue { get; set; }
Property Value
MinValue
Gets or sets the minimum value that can be set through the DoubleTextBox.
Declaration
public double MinValue { get; set; }
Property Value
Text
Overrides the Text property of System.Windows.Forms.TextBox.
Declaration
public override string Text { get; set; }
Property Value
ThemeStyle
Declaration
public DoubleTextBoxVisualStyle ThemeStyle { get; set; }
Property Value
UseNullString
Indicates whether the NULLString property will be used.
Declaration
[Obsolete("This property will not be used in future.Insead Use AllowNull")]
public bool UseNullString { get; set; }
Property Value
Methods
ApplyFormatting(String)
Formats the given text according to the current setting.
Declaration
protected override string ApplyFormatting(string rawValue)
Parameters
| Type |
Name |
Description |
| System.String |
rawValue |
|
Returns
Overrides
CheckForMinMax(String, Boolean)
Declaration
protected override bool CheckForMinMax(string currentTextValue, bool ignoreLength)
Parameters
| Type |
Name |
Description |
| System.String |
currentTextValue |
|
| System.Boolean |
ignoreLength |
|
Returns
Overrides
CheckIfNegative(String)
Declaration
protected override bool CheckIfNegative(string rawValue)
Parameters
| Type |
Name |
Description |
| System.String |
rawValue |
|
Returns
Overrides
CheckIsZero()
Declaration
protected override bool CheckIsZero()
Returns
Overrides
CheckNullStringIsInRange(String)
Declaration
protected override bool CheckNullStringIsInRange(string nullString)
Parameters
| Type |
Name |
Description |
| System.String |
nullString |
|
Returns
Overrides
CreateAccessibilityInstance()
Declaration
protected override AccessibleObject CreateAccessibilityInstance()
Returns
| Type |
| System.Windows.Forms.AccessibleObject |
Overrides
Dispose(Boolean)
Releases the unmanaged resources used by the DoubleTextBox and optionally releases the managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type |
Name |
Description |
| System.Boolean |
disposing |
true to release both managed and unmanaged resources; false to release only unmanage resources.
|
Overrides
FormatChanged(String, NumberFormatInfo)
Declaration
protected override void FormatChanged(string currentText, NumberFormatInfo previousFormat)
Parameters
| Type |
Name |
Description |
| System.String |
currentText |
|
| System.Globalization.NumberFormatInfo |
previousFormat |
|
Overrides
GetControlName(String)
Helps to override the ThemeName property settings
Declaration
public override string GetControlName(string controlName)
Parameters
| Type |
Name |
Description |
| System.String |
controlName |
ThemeName
|
Returns
Overrides
GetNumberPartLength(Double)
Declaration
protected int GetNumberPartLength(double numberValue)
Parameters
| Type |
Name |
Description |
| System.Double |
numberValue |
|
Returns
GetNumberValue(String, Int32)
Declaration
protected override string GetNumberValue(string formattedText, int startPosition)
Parameters
| Type |
Name |
Description |
| System.String |
formattedText |
|
| System.Int32 |
startPosition |
|
Returns
Overrides
GetValue()
Declaration
protected override object GetValue()
Returns
Overrides
HandleBackspaceKey()
Declaration
protected override bool HandleBackspaceKey()
Returns
Overrides
HandleDecimalKey()
Declaration
protected override bool HandleDecimalKey()
Returns
Overrides
HandleDeleteKey()
Declaration
protected override bool HandleDeleteKey()
Returns
Overrides
HandleSubtractKey()
Declaration
protected override NumberModifyState HandleSubtractKey()
Returns
Overrides
InitializeNumberTextBox()
Declaration
protected override void InitializeNumberTextBox()
Overrides
IsAssignable(Object)
Declaration
protected override bool IsAssignable(object val)
Parameters
| Type |
Name |
Description |
| System.Object |
val |
|
Returns
Overrides
IsValidNumberValue(String)
Declaration
protected override bool IsValidNumberValue(string doubleString)
Parameters
| Type |
Name |
Description |
| System.String |
doubleString |
|
Returns
Overrides
OnDoubleValueChanged(EventArgs)
Declaration
protected virtual void OnDoubleValueChanged(EventArgs e)
Parameters
| Type |
Name |
Description |
| System.EventArgs |
e |
A System.EventArgs that contains the event data.
|
OnEnabledChanged(EventArgs)
Raises the System.Windows.Forms.Control.EnabledChanged event.
Declaration
protected override void OnEnabledChanged(EventArgs e)
Parameters
| Type |
Name |
Description |
| System.EventArgs |
e |
An System.EventArgs that contains the event data.
|
Overrides
OnEnter(EventArgs)
Overrides the System.Windows.Forms.Control.OnEnter(System.EventArgs) method.
Declaration
protected override void OnEnter(EventArgs args)
Parameters
| Type |
Name |
Description |
| System.EventArgs |
args |
The event data.
|
Overrides
OnGotFocus(EventArgs)
Helps to override the OnGotFocus events
Declaration
protected override void OnGotFocus(EventArgs e)
Parameters
| Type |
Name |
Description |
| System.EventArgs |
e |
An System.EventArgs that contains the event data.
|
Overrides
OnKeyDown(KeyEventArgs)
Raises the System.Windows.Forms.Control.KeyDown event.
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
| Type |
Name |
Description |
| System.Windows.Forms.KeyEventArgs |
e |
A System.Windows.Forms.KeyEventArgs that contains the event data.
|
OnLostFocus(EventArgs)
Declaration
protected override void OnLostFocus(EventArgs e)
Parameters
| Type |
Name |
Description |
| System.EventArgs |
e |
|
Overrides
OnTextChanged(EventArgs)
Declaration
protected override void OnTextChanged(EventArgs e)
Parameters
| Type |
Name |
Description |
| System.EventArgs |
e |
The event data.
|
Overrides
OnThemeNameChanged(String)
Helps to apply the ThemeName settings in control
Declaration
public override void OnThemeNameChanged(string themeName)
Parameters
| Type |
Name |
Description |
| System.String |
themeName |
ThemeName
|
Overrides
OnValidated(EventArgs)
Declaration
protected override void OnValidated(EventArgs e)
Parameters
| Type |
Name |
Description |
| System.EventArgs |
e |
|
OnValidating(CancelEventArgs)
Declaration
protected override void OnValidating(CancelEventArgs e)
Parameters
| Type |
Name |
Description |
| System.ComponentModel.CancelEventArgs |
e |
|
Overrides
PrepareInsertString(String, Int32, Int32, String, Boolean)
Declaration
protected override NumberModifyState PrepareInsertString(string currentText, int startPosition, int selectionLength, string textToBeInserted, bool pasteOperation)
Parameters
| Type |
Name |
Description |
| System.String |
currentText |
|
| System.Int32 |
startPosition |
|
| System.Int32 |
selectionLength |
|
| System.String |
textToBeInserted |
|
| System.Boolean |
pasteOperation |
|
Returns
Overrides
ResetText()
Restores the CurrencyNumberDigits to the MaximumLength.
Declaration
protected void ResetText()
SetDoubleValue(Double)
Declaration
protected void SetDoubleValue(double newValue)
Parameters
| Type |
Name |
Description |
| System.Double |
newValue |
|
SetNullNumberValue()
Declaration
protected override void SetNullNumberValue()
Overrides
SetTextProperty(String)
Declaration
protected override void SetTextProperty(string newText)
Parameters
| Type |
Name |
Description |
| System.String |
newText |
|
Overrides
SetValue(Object)
Declaration
protected override void SetValue(object val)
Parameters
| Type |
Name |
Description |
| System.Object |
val |
|
Overrides
ShouldSerializeText()
Indicates whether to serialize the Text property
if it is null or quals NullString
Declaration
protected bool ShouldSerializeText()
Returns
ToggleNegative(String)
Declaration
protected override string ToggleNegative(string currentText)
Parameters
| Type |
Name |
Description |
| System.String |
currentText |
|
Returns
Overrides
Events
DoubleValueChanged
Declaration
public event EventHandler DoubleValueChanged
Event Type
Implements
System.ComponentModel.ISupportInitialize
System.Runtime.Serialization.ISerializable