Loading...
Loading...
Guide to implementing Syncfusion WinForms DoubleTextBox control for accepting double-precision floating-point values with customizable formatting and validation. Use this when working with numeric input controls requiring double data type support, decimal formatting, or value range constraints in Windows Forms applications.
npx skill4agent add syncfusion/winforms-ui-components-skills syncfusion-winforms-double-textboxusing Syncfusion.Windows.Forms.Tools;
// Create instance
DoubleTextBox doubleTextBox1 = new DoubleTextBox();
this.Controls.Add(doubleTextBox1);
// Set value constraints
doubleTextBox1.MaxValue = 100;
doubleTextBox1.MinValue = 0;
// Handle value changes
doubleTextBox1.DoubleValueChanged += (s, e) =>
MessageBox.Show("Value changed");DoubleValueMaxValueMinValueNumberDecimalDigitsNumberDecimalSeparatorNumberGroupSeparatordoubleTextBox1.MinValue = 0;
doubleTextBox1.MaxValue = 100;
doubleTextBox1.NumberDecimalDigits = 2;
doubleTextBox1.Text = "50";doubleTextBox1.NumberDecimalDigits = 2;
doubleTextBox1.NumberGroupSeparator = ",";
doubleTextBox1.NumberDecimalSeparator = ".";
doubleTextBox1.Text = "1234.56";doubleTextBox1.KeyDown += (s, e) =>
{
if (e.KeyCode == Keys.Up)
doubleTextBox1.DoubleValue++;
else if (e.KeyCode == Keys.Down)
doubleTextBox1.DoubleValue--;
};doubleTextBox1.AllowNull = true;
doubleTextBox1.NullString = "";
doubleTextBox1.Text = "";| Property | Type | Purpose |
|---|---|---|
| double | Gets or sets the double value of the textbox |
| double | Maximum allowed value |
| double | Minimum allowed value |
| int | Number of decimal places to display |
| string | Decimal separator character |
| string | Thousands separator character |
| int[] | Sizes of number groups |
| int | Pattern for negative numbers |
| bool | Hide trailing zeros in display |
| bool | Allow null/empty values |
| string | String representation of null |