Tools Windows Vol 3 Preview – Editor Controls | Syncfusion Blogs
Live Chat Icon For mobile
Live Chat Icon
Popular Categories.NET  (165).NET Core  (29).NET MAUI  (112)Angular  (91)ASP.NET  (51)ASP.NET Core  (81)ASP.NET MVC  (89)Azure  (39)Blazor  (174)BoldSign  (2)DocIO  (23)Essential JS 2  (95)Essential Studio  (186)File Formats  (38)Flutter  (124)JavaScript  (210)Microsoft  (116)PDF  (70)React  (83)Succinctly series  (130)Syncfusion  (679)TypeScript  (33)Uno Platform  (3)UWP  (4)Vue  (45)Webinar  (41)Windows Forms  (59)WinUI  (59)WPF  (142)Xamarin  (158)XlsIO  (27)Other CategoriesBarcode  (5)BI  (29)Bold BI  (6)Build conference  (7)Business intelligence  (54)Button  (4)C#  (125)Chart  (70)Cloud  (13)Company  (445)Dashboard  (8)Data Science  (3)Data Validation  (7)DataGrid  (59)Development  (485)Doc  (7)DockingManager  (1)eBook  (98)Enterprise  (22)Entity Framework  (5)Essential Tools  (14)Excel  (25)Extensions  (21)File Manager  (5)Gantt  (16)Gauge  (11)Git  (5)Grid  (28)HTML  (13)Installer  (2)Knockout  (2)Language  (1)LINQPad  (1)Linux  (2)M-Commerce  (1)Metro Studio  (11)Mobile  (373)Mobile MVC  (9)OLAP server  (1)Open source  (1)Orubase  (12)Partners  (21)PDF viewer  (34)Performance  (12)PHP  (2)PivotGrid  (4)Predictive Analytics  (6)Report Server  (3)Reporting  (10)Reporting / Back Office  (11)Rich Text Editor  (10)Road Map  (11)Scheduler  (46)SfDataGrid  (9)Silverlight  (21)Sneak Peek  (25)Solution Services  (3)Spreadsheet  (11)SQL  (10)Stock Chart  (1)Surface  (4)Tablets  (5)Theme  (12)Tips and Tricks  (106)UI  (263)Uncategorized  (68)Unix  (2)User interface  (68)Visual State Manager  (2)Visual Studio  (24)Visual Studio Code  (17)Web  (458)What's new  (243)Windows 8  (19)Windows App  (2)Windows Phone  (15)Windows Phone 7  (9)WinRT  (26)

Essential Tools Windows Vol 3 Cool Preview – Editor Controls

ENHANCED NumberTextBoxes

PlatformWindows Forms
ControlEditors Package >> Editor Controls>> NumberTextBoxes
Feature(s)Enhancing Editor Controls


We’ve revamped NumberTextBoxControls ( IntegerTextBox, DoubleTextBox, CurrencyTextBox and PercentageTextBox). In this revamping process we’ve redefined the controls behavior and ensured the functionality of all the APIs in the mentioned controls.

We’ve moved all the common features and behaviors in to a single base class which is NumberTextBoxBase and overridden the required behavior alone in the respective controls.



NullStateIsNullDepreciated as it had Getter and Setter and was confusing. See IsNull for more details.
UseNullStringAllowNullThis behavior is incorporated with AllowNull; previously both AllowNull and UseNullString existed. They were removed for better clarity
IsNullValueIsNullIsNullValue means the same as NullState and IsNull; it has been deprecated for better clarity.

NumberDecimalDigits (This is not available for IntegerTextBox)

This makes validation complex with MaxValue as 1000 and MaxLength as 2.

The same behavior can be achieved with the alternatives suggested.

EnforceMinMaxDuringValidatingOnValidationFailed.KeepFocusNo need for EnforceMinMaxDuringValidating, as MinMaxValidation exists already.

We’ve tweaked the controls to keep the focus inside the control when validation fails, which was the original intention of EnforceMinMaxDuringValidating, if needed by using OnValidationFailed.


IsNull (Read Only)Returns a Boolean specifying the NullState of the controlTrue when Control.Text equals String.Empty or NullString
AllowNullSpecifies whether the field can be null.Related to NullString. When the field is null, NullString will be set. If you want to empty the control when the entire content is deleted then set AllowNull to true and NullString to String.Empty.
NullStringSpecifies the string that will be set when the field is null.Allow null must be true to set this string. If false, then Zero or MinValue, whichever is higher, will be set.

Leave it blank if the field has to be empty

*OnValidationFailedSpecifies the action to be performed when validation fails on a control loosing focus.





(Refer to the notes for more details.)





*MinMaxValidation.OnKeyPressEach and every key press is validated to ensure the value meets the constraints.This is most useful when MinValue is a single digit.

(Refer to the notes for more details.)

*MinMaxValidation.OnLostFocusValidation happens only when the control loses focus.This allows the user to enter any value  that will be validated when the focus is lost.

You can make use of the OnValidationFailed property to gain control over what has to be done when validation fails.

(Refer to the notes for more details.)

MinValueSets the minimum value allowed for the control. It cannot be greater than MaxValue.An exception will be thrown; reset the MaxValue accordingly.
MaxValueSets the maximum value allowed in the control. It cannot be lesser than MinValue.An exception will be thrown; reset the MinValue accordingly.
NullStringString to be displayed when the control’s value is made null. Cannot be a numeric value that could break the MinValue or MaxValue constraints.Example: MinValue 10, MaxValue 100 and NullString as “111” will break the min-max values.

Below are some general use-case scenarios for a better understanding of the behavior changes of the NumberTextBox controls (IntegerTextBox, DoubleTextBox, CurrencyTextBox, and PercentageTextBox).

Scenarios for better understanding:

  • With MinMaxValidation.OnKeyPress and MinValue as 10 – Each and every key press will be validated to meet the constraints, so this will not allow you to enter values less than 10, even if you try to enter 11 you cannot input the value as every keystroke is validated. This behavior is useful when MinValue is a single digit; in such cases, go for inMaxValidation.OnLostFocus.
  • With MinMaxValidation.OnLostFocus – User input will be validated only when a control loses focus. Hence, end-users can input any value. OnValidationFailed will give you access to what action [SetNullString, SetMinorMax, KeepFocus] has to be done when validation for the input fails.
  • With OnValidationFailed.SetNullString and AllowNull as False – The control will keep its focus as AllowNull is False.

If you need any clarifications or find any difficulties in using the control, please feel free to contact Syncfusion Technical support through Direct-Trac or our public Community Forums.



Share this post:

Popular Now

Be the first to get updates

Subscribe RSS feed
Scroll To Top