WinForms TextEdit — New v20.2 Features

WinForms Team Blog
19 October 2020

We recently published a list of enhancements and new features we expect to ship across our WinForms product line in our v20.2 release cycle: What’s New in v20.2.

We expect to update this list prior to release as it does not include a complete summary of new WinForms-related features/products. One of the features we did not include in beta involves our new “Advanced Mode” for our WinForms Text Editors. This new option adds a number of interesting options to all of our TextEdit-based WinForms editors (except for TokenEdit, HyperTextLabel and HyperlinkEdit controls).

To activate this new mode, enable the Properties.UseAdvancedMode property, or (if you want to upgrade all editors in your app) the static WindowsFormsSettings.UseAdvancedTextEdit property.

Animated Caret and Selection

We reworked TextEdit painters so that caret movement and text selection are more pleasing to the eye (smoother, more elegant):

Additionally, text selection color is now based on the currently applied skin.

Caret and selection animations are managed by the AdvancedModeOptions.AllowCaretAnimation and AdvancedModeOptions.AllowSelectionAnimation properties.

Embedded Labels

Labels are a text box controls best friends - they seem to always travel together. If an app includes a text box for first name values, it will often have a “First Name” label next to the text box itself. Otherwise, users would have no way to distinguish the purpose of the text field.

In our new advanced mode you can set the AdvancedModeOptions.Label property and the editor will embed this string directly within the text box. I think you’ll agree that this is an elegant solution for those who want to eliminate use of field labels.

As you can see in this animation, this updated mode is fully compatible with our overhauled mask engine (if you’ve missed this major update announcement, see the “Editors” section of our What’s New page: WinForms Controls v20.2)

Emojis

Whether your users insert a string that contains an emoji, or press the “Win+.” hotkey to enter an emoji from the Windows library, text editors running in this new mode will display them automatically. Note: if you want colored emojis, you will need to enable the AdvancedModeOptions.UseDirectXPaint property for required editors. Otherwise, editors will display black-and-white versions of standard emojis.

Performance Upgrade

Of course, this wouldn’t be a DevExpress feature without meaningful performance enhancements. Text Edit controls in this new advanced mode allow users to insert text blocks of any sizes (standard editors have the 32,767 characters limitation). And yes, text insert operations are faster than the Windows Notepad even with text wrapping enabled.

During our tests, we resized a sample edit form with 400 text edits. A form with our updated text edit results in 1,581,427 ticks on average – a 37% boost when compared to the 2,542,614 ticks for a form with standard text edits.

Download and run the following samples to test the smoothness of our text box with 100,000 lines: MemoEdit Sample, TextEdit Sample.

Tell Us What You Think

By now, you may be wondering why we implemented a dedicated mode for these new features. The reason is that TextEdits in “advanced” and “standard” mode are significantly different controls (though you won’t notice any difference).

A TextEdit running in standard mode uses the default WinForms masked text box. We have added a pinch of DevExpress flavor to this default control, but at its core, this is still the same control with all of its strengths and weaknesses. Our “advanced” Text Edit uses a completely different control. This allows us to access and modify all portions of the control (like caret and movement animations). On the downside, such a new control can introduce unforeseen issues – simply said, when you create your own implementation of a platform’s most frequently used control, chances are high that something, somewhere will not work as expected.

The “UseAdvancedMode” property is a safety kill switch that allows you to instantly roll-back to the standard DevExpress TextEdit should you encounter issues (however rare those issues might be). We expect this mode to be the default in a future release – once we have rock-solid evidence that all outstanding issues have been addressed. For now, please test this mode in your solutions and share your feedback.

And do comment below - Do you see a place for these upgraded text editors in your next WinForms app?

Showcase Your Apps on DevExpress.com

Highlight your business app and share your development experiences with the DevExpress community. To include your app in our upcoming App Showcase, please forward an application screenshot to clientservices@devexpress.com and tell us which DevExpress products you currently use within your organization.
39 comment(s)
Andrew S Johnson
Andrew S Johnson

These are great improvements. It's there any plan to bring these to WPF? Specifically the embedded label?


Thank you

19 October 2020
Jeff Stiegler
Jeff Stiegler
Our issue with your word processor and PDF viewer/editor is the very slow load times.  Any plans to significantly improve load times?
19 October 2020
Yahya
Yahya

Embedded labels are very nice. Hopefully available in XAF.

19 October 2020
Warren Wander
Warren Wander
What's the control being used in the dental "Latest Procedures" window region?  The one showing the timeline "October 19 2020..." and the nice line and circle indicating the timeline?  I'm looking to create & use something like this...
19 October 2020
Laurence
Laurence
Embedded labels look awesome!  It's great you keep innovating to keep up with the more modern platforms 
19 October 2020
Dmitry (DevExpress)
Dmitry (DevExpress)

@Andrew S Johnson @Jeff Stiegler I've passed your question to WPF and Office teams, thank you.


@Yahya XAF's WinForms UI is using DevExpress WinForms controls. You can use the aforementioned control API to enable this functionality in your XAF apps. For more information, please see Ways to Access UI Elements and Their Controls


@Warren Wander That's the vertically oriented StepProgressBar control, available in v20.1. Keep an eye on our "What's New" announcements to make sure you're not missing something you'd gladly use in your projects!


@Laurence Thank you. Yes, I had the same reaction when I saw the first prototype :) It's amazing how controls like a regular text box or a button can still have plenty of room to evolve and bring new design ideas to the table.


19 October 2020
Heiko Mueller
Heiko Mueller
Great additions to the most used control... Especially the embedded labels and the animations for caret and selection are simply brilliant. I'm just here to say THANK YOU! 
19 October 2020
Benjamin Hofmann
Benjamin Hofmann

Looks great!


The embedded labels would be also a great feature for the LayoutControl especially for existing applications. 

20 October 2020
dbSoft
dbSoft
We like animations!! It looks Nice!
20 October 2020
Manuel Grundner [DevExpress MVP]
Manuel Grundner [DevExpress MVP]
Awesome work! ❤
20 October 2020
Lluis Franco
Lluis Franco

Nice job guys!

Embedded labels are AWESOME!

Are just for TextEdit controls? What about DateEdit, ButtonEdit, HyperLink and others? :D

20 October 2020
Julian Bobbett 1
Julian Bobbett 1
Those Embedded Labels look really good. They'll really modernise the look of the forms.
20 October 2020
Appy Developers
Appy Developers

Awesome features, thanks on your work.

But hope you put in your mind localization, and RTL properties of the inner Labels.



20 October 2020
Appy Developers
Appy Developers

Hope these feature will come in repository textbox based components for embe

ded fields.


20 October 2020
Dmitry (DevExpress)
Dmitry (DevExpress)

@Lluis Franco These features apply to all of our TextEdit-based WinForms editors (except for TokenEdit, HyperTextLabel and HyperlinkEdit controls).


@Appy Developers Yes, that's exactly why we didn't want to rush and made a separate "mode" that you can toggle on or off. We'll make sure all reasonable requests like yours are implemented before this mode is officially ready.


Everyone else, thank you for such wonderful feedback! It's great to know you're excited about this new design idea as much as we are :)

20 October 2020
Markus Bollenberg 1
Markus Bollenberg

Do you see a place for these upgraded text editors in your next WinForms app? ...

Yes, I could imagine the change to get an even better supported TextEdit Control. The type could also be expanded so that a TextEdit could be offered for a wide variety of scenarios (e.g. offering new functionalities from major version to major version to offer downward compatibility).
A general switch for setting (active/deactive or TextEdit/<XYZType>) could be useful (e.g. via the Devexpress Project Settings) so that errors occurring during runtime could be equalized.


20 October 2020
Lluis Franco
Lluis Franco

Thx @Dmitry

So DateEdit control is not based en TextEdit? :S

21 October 2020
Lluis Franco
Lluis Franco

Forget it.

DateEdit inherits from

TextEdit
   ButtonEdit
     PopupBaseEdit
       DateEdit

Thx,

21 October 2020
QUALCO SA
QUALCO SA
Does this mode Label Embedding can be applied to LayoutControl / DataLayoutControl?
21 October 2020
Alex Chuev (DevExpress)
Alex Chuev (DevExpress)
@Andrew:

We have no plans to bring Embedded Labels to WPF at this point. If you wish to discuss this scenario further, feel free to contact me at wpfteam@devexpress.com.

Thanks,
Alex
21 October 2020
Anurag Mahato
Anurag Mahato
What about Embedded label in Blazor ?
21 October 2020
Rudy Scott
Rudy Scott
Kind of off-topic, but what control is used to render the "Latest Procedures" shown in the scheme color highlighting screenshot?
21 October 2020
CRM-d7dd74bf-0ed3-4a03-8c11-ea20c723286e
Matthias
Do I see it right, that using embedded labels means, that the textbox editor is ALWAYS twice higher then usual?
22 October 2020
Dmitry (DevExpress)
Dmitry (DevExpress)

@QUALCO SA we will definitely explore whether it will be possible to introduce this mode in Layout Control. This is a very logical request indeed, if you have it in stand-alone controls, why not in automatic form layout manager as well.


@Rudy Scott check my previous answer to Warren - that’s the Step Progress Bar we’ve released in v20.1.


@Matthias I’m not sure whether they are exactly twice as high, but yes, they are always higher than regular editors. Basically you’re getting a two-line editor instead of a single-line, it has to gain some height in order to accommodate that extra string.



22 October 2020
QUALCO SA
QUALCO SA
That will be awesome as we heavily use Layout and it will look much more modern
24 October 2020
QUALCO SA
QUALCO SA
That will be awesome as we heavily use Layout and it will look much more modern
24 October 2020
CRM-54e0b902-b468-4bc4-a9aa-083d5a3807d5
Georgios Konstantinidis
Any expected date for the release of the dental clinic demo?
26 October 2020
Dmitry (DevExpress)
Dmitry (DevExpress)
@Georgios it’s already available in the v20.2 beta. Check out our Demo Center, the upper row next to other real-life demos.
26 October 2020
Appy Developers
Appy Developers

Hi,

 I tried to enable:

WindowsFormsSettings.UseAdvancedEditMode

but VS says that this property is not defined, so which library should i include in the using list.


27 October 2020
Chuck Bass
Chuck Bass
Thank you for this update.  I have wanted labels as part of text boxes for many many years.  I will screw around lining things up in the the form designer much less with this update and it will always look right.  Great for codes without a design team. Thank you.
27 October 2020
Dmitry (DevExpress)
Dmitry (DevExpress)

@Appy I'm sorry, I've mistyped the property name. It's UseAdvancedTextEdit, not "UseAdvancedEditMode". Thank you for noticing this.


@Chuck Indeed, no more hassle with trying to align dozens of labels along the same amount of text edits. And you're saying you had this in mind for years - please share such awesome ideas with us via Support Center or here in the comments. Even if we don't implement everything immediately, we'll make sure to keep them in touch in our backlog.

27 October 2020
Appy Developers
Appy Developers
@Dmitry: Thanks.
28 October 2020
Chuck Bass
Chuck Bass
Not my idea, @Dmitry, the first UI library I used, back in the 90's, was called Forms and it ran on SGI workstations.  The text edit control had a label attached to it.  Every system I've worked on since has felt wrong.  LOL.
28 October 2020
Dmitry (DevExpress)
Dmitry (DevExpress)

@Chuck ah, I see. No wonder I don’t recall seeing that on desktop, I was making sand pies in the kindergarten back in those days :)


Still, all I’m saying is that we’re always open to valuable suggestions and listen closely to customer feedback. We’re here to eliminate anything that feels wrong and make things right - that’s the core of our business. So be sure to share any great ideas you have, even when they’re not entirely yours ;)

28 October 2020
Mar c
Mar c
truly cool... love it
29 October 2020
Mario K.
Mario K.

Thumbs up for Embedded Labels! Really fresh looking UI style, congrats!

But I cannot get the Label text shown, when the EditControl has TextEditStyle = Disabled (e.g. SearchLookupEdit seems to force EditStyle = Disabled). I should be able to use it on ALL controls, otherwise the great benefit of resdesign is gone when I have to mix it up with old Label/Control mode... Also the VS designer always needs to be closed and reopened after switching to UseAdvancedMode to show the changes...

Still a big thanks you for improving WinForms controls!

29 October 2020
Mario K.
Mario K.

Another small bug: After setting controls back from ReadOnly=True to Readonly=False the control area is correctly painted white again, but the EnbeddedLabel itself stays grayed out...

Seems to be some work left to be done ;)

29 October 2020
Dmitry (DevExpress)
Dmitry (DevExpress)

@Mario Thank you for posting these findings. Sorry for the delayed response, we spent some time testing issues you've mentioned.


The TextEditStyle issue is the most complicated. The problem is that when an editor is in "DisableTextEditor" mode, there's no TextEdit within, and as a result, there's nowhere to show an embedded label. However, this technical detail does not make your request any less reasonable. Our devs will investigate this issue and will try to find a way to pass the Label property value to editors with disabled text edits.


Two other issues you've mentioned are straight out bugs, you can track the progress in the T944742 and T944321 Support Center tickets.

30 October 2020
CRM-87f890ed-5377-464b-9bcd-90a47bc6cbcc
Customer174776
It looks like it will have a lot of new features
2 December 2020

Please login or register to post comments.