- Online Barcode Generator
- How To
- Buy Now
Text Format Property of C# Text Edit Box Control
The Text Edit Box Control is a C# component which is capable of using the predefined themes included in the .NET UI WinForms Control. It is used to format and constrain text to a pattern that has been predefined or defined by users. This Text Edit Box Control entirely provides the support of globalization which allows users edit the date and time and navigation with the arrow keys like up and down.
The Text Format Property is offered to get a value from the Text property which is different from the editor that the end user finding. The Text Format Property is used to get the variations of the Text property value without considering the prompt characters, and the literals in the Text Editor Control. The valid values of the Text Format property contain ContainPromptNLiterals, ExcludePromptNLiterals, ContainPrompt, and ContainLiterals.
How the Text Format Properties Works
The steps and C# code below shows how the text format properties work while utilizing text box control.
Define the text box with the C# code below.
Then, when we input the a number type, "000123456", which is less one character that the type defined in the prompt places, so the result in the UI KetticEditBox will be "(000) 123-456_"
The above sample demonstrates that we will have the prompt character instance '_', literals: '(' , ')', '-' and ' ' (empty space), as well as user input: "0001234567". And the value property of the Text Edit Box control will display based on the text format value as below.
The steps and C# code below shows how the text format properties work while defining the currency utilizing text box control.
Define the currency text box with the C# code below:
Then, when we input a number type, "-1234.56", which misses the dollar symbol and the comma between 1 and 234, so the result in the UI KetticEditBox will be "-$1,234.56"
The above sample demonstrates that we will have Literals: '$' and '. However, the ''-' and '.' are a part of the real decimal value and the prompt characters will not be included. And the value property of the Text Edit Box control will display based on the text format value as below.
UI Controlsfor Windows Forms.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls