Major speed enhancements in WinForms grid (coming soon in v17.2)

02 November 2017

Now that we’ve published the beta for v17.2, it’s time to reveal a major new enhancement for our WinForms grid. After reading this, I’m going to bet you’ll be downloading the installer and trying it out for yourself. Let us know your results!

WinForms. It’s been around since the very first days of .NET. Our first control for the run-time, released before .NET had even come out of beta (2002!), was XtraGrid, and we’ve released numerous other controls and suites for the platform since then. And after 15 years, Microsoft has pretty much frozen new development for WinForms. It’s got that taint of “legacy”.

And yet… People are still writing new thick-client apps for Windows. They have existing successful business apps in daily use that need maintaining and enhancing. Indeed, in every major release we provide new functionality and even new controls for WinForms. It is not going away.

MicrosoftDirectXOne big issue is that, compared to 15 years ago, the monitors and display adapters we use for Windows have become faster and have much higher resolution and WinForms has not kept up. We are now talking about and using 4K screens, so called because they are roughly 4,000 pixels horizontally (the main standard is 3840×2160, which is twice the resolution horizontally and vertically of the 1080p standard, or 4 times the number of pixels). Not only that, but the standard for drawing graphics on the screen has changed: it used to be GDI+ but is now DirectX. One of the big differences between the two is DirectX renders graphics through hardware acceleration, whereas the older GDI+ does not; simply put, DirectX is faster. Poor old WinForms still uses GDI+ under the hood.

Given all this, our WinForms team at DevExpress decided to do an experiment, or a spike in development-speak: could they take one of our more complicated WinForms controls—oh, let’s say that original control we wrote, the good old data grid – and change its rendering code to use DirectX and hardware acceleration instead of the “built-in” WinForms GDI+? Would anyone notice the purported speed improvements?

[…time passes, lots of work is done…]

Well? The result? Wow. To be blunt: this is going to revolutionize WinForms.

A big example: one of the most intensive rendering tasks we can do with the data grid is to scroll the rows in the grid pixel-by-pixel. On one of our hi-res test machines, with GDI+ we get about 22 frames per second. In other words, what’s happening in crude terms is for each frame the code is scrolling the data rows by a pixel and then adding another single row of pixels. Every second on the test machine, we can do that 22 times with GDI+. Just about flicker free. With DirectX? 72 FPS, over three times faster. That’s just butter smooth. Our competition, for the same task, is way behind (which also goes to show how well we’d optimized the grid up to now).

With a scroll by page example (where each frame is a new page), we used to get 25 FPS. With DirectX, 35 FPS.

But that’s not all. In essence, all of this work is done way down in the depths of the grid. The DirectX grid is totally compatible with the old GDI+ grid: all that needs to be done is to set a single option. So, you already have an app with our grid but want that extra rendering speed? Recompile with v17.2, set the option, and you’re away. Get on your users’ Christmas card lists again.

There are some limitations that you should be aware of with this new functionality. The biggest one is that it does not work under Windows versions that are older than 8, with Windows 7 being the biggest example. I’d have to say that, given that the end of extended support for Windows 7 is only 2 years away, is not that big of an issue. For these older operating system versions, if you set the DirectX hardware-acceleration option, it’s simply ignored and you automatically just get standard GDI+ speeds. (Ditto, if there’s some issue with DirectX rendering, there’s an auto-fallback to GDI+).

UPDATE 20-Nov-2017: Windows 7 is now supported!

Next, if you are doing any of your own drawing in the grid by using the window handle for example, it’ll be ignored, but then again it’s bad practice. If, however, you do have some custom draw handlers that use e.Graphics , you must now use the e.Cache.* methods instead. We plan to introduce some special tools and/or modes to catch potential problems with custom draw later.

In v17.2, the only control that will have this enhanced DirectX support will be the aforementioned data grid, XtraGrid. We have plans to upgrade our other major controls in future versions (v18.1, v18.2, and so on). Note that we have our ideas on the order to enhance them (tree list, pivot grid, and so on), but we’d love to hear from you what would be most important to you in your WinForms apps.

36 comment(s)
Christopher Jay

Can you expand on "it will be really resource hungry"?  How bad?  Unusable by our clients who have lower-spec machines?

2 November, 2017
Jacobo Amselem

Very exciting news!

Can you add an "automatic" option, so if the underlying OS is under win8 then fallback to GDI+?

2 November, 2017
Julian Bucknall (DevExpress)

Christopher: It seems I was premature to talk about resources. Yes, DirectX uses more resources than GDI+, but we haven't measured the effect in the grid in any meaningful way (unlike the speed improvements I mentioned).

Cheers, Julian

2 November, 2017
Julian Bucknall (DevExpress)

Jacobo: I didn't make that clear in the original text, but I have now. There is an automatic fallback to GDI+ should the machine the code is running on warrant it (eg, it's Windows 7).

Cheers, Julian

2 November, 2017

Sounds great Julian.

2 November, 2017
T. Thijs

Will this work in remote desktop sessions ?

3 November, 2017
Christopher Jay

I nominate the GalleryControl for this feature  :)

3 November, 2017
Mike Falcon (DevExpress)

T. Thijs:

Yes - it works way faster than GDI+ via remote desktop sessions

3 November, 2017
Chris Royle (LOB)

"To be blunt: this is going to revolutionize WinForms." - throwing expectation management out the Windows.

The inevitable question, is this available within XAF Win applications by setting the appropriate option ?

3 November, 2017
Julian Bucknall (DevExpress)

Chris: Well, yes. There's no "UseDirectXExceptForXAF" option. :) Again: currently it's only the grid, and only for Windows 8+, but apart from that, any WinForms app with a grid will benefit. It's "just" the rendering engine...

Cheers, Julian

3 November, 2017
Richard Stevens

And now you've turned them loose to do the same thing on the VCL cxGrid, yes? Fab. Thank you!

3 November, 2017
Julian Bucknall (DevExpress)

Richard: Now, now, now. Can't reveal everything in one go! :P

Cheers, Julian

3 November, 2017
Heiko Mueller

WHAT GREAT NEWS... Since ages I ask myself why the hell Windows/GDI doesn't use all this powerfull graphic processors. With a DirectX-Version of DevExpress a dream will be come thrue... With all this possibilties of a modern display technology - like better transitions, effects like blur and so on.

4 November, 2017
Randy Jean

This is great news!

4 November, 2017
Stephen J White

Wow. When I saw this I was ecstatic! You guys have done a lot to keep Winforms viable and it just amazes me that you continue to put so much time and effort into it.

Here's hoping you get all the basic editors on Direct X in the near future!

6 November, 2017
Stepan Lauryn

Hi Julian,

Do you plan migrate SpreadSheet control do DirectX? I used spreadsheat control for drawing my complex scheduling plain. And speed is critical for our Customer on large screen.



7 November, 2017
Mike Falcon (DevExpress)


We're going to extend DirectX support to other controls

8 November, 2017
Paul Singh 1

Julian i have a question on winforms 17.2 , it has Drag and Drop capability , correct?

i downloaded 17.2 and tried to create a grid with data , and was trying to see how to use Drag and Drop in this version , i could not find that option under behavior management , can you give an example of drag and drop on grid in 17.2 , this option is available in 17.2 beta , it says that on major add ons for this version.

Thanks , Paul

9 November, 2017
Mike Falcon (DevExpress)


You can check Drag & Drop demo in XtraGrid demos.

In release version there will be slightly different appearance and behavior for drag drop.  

10 November, 2017

XtraScheduler please, in timeline view I get long redraw rates if there are a lot of resources and appointments on screen.

14 November, 2017
Paul Singh 1

Thanks Mike i will check this out , so Drag and Drop is available in XtraGrid for winforms , correct ?

16 November, 2017
Bernd Niedergesaess

Definitly the XtraTreeList needs to follow next, as this is for sure as much used as the XtraGrid.

And then the XtraScheduler...

16 November, 2017
Gabriel Araujo 1

I second the request for the XtraScheduler, that's a typical control that's used on big screens with loads of activities on it!

16 November, 2017
Dmitry Babich (DevExpress)


Yes, you can find this functionality in our Demo Center: launch "WinForms Data Grid and Editors" demo and open the "Drag & Drop" module.

17 November, 2017
Istvan Kardkovacs

What can I say. Wow! I've tried it and it was really fast. My candidate for the next control is the chart. On 4K screen a simple chart eats 30-40 Mb memory.

18 November, 2017
Václav Jaroš

Faster DirectX rendering in XtraScheduler would be great pleasure for our customers!

20 November, 2017

Are stand-alone editor controls support directx mode?

22 November, 2017
Julian Bucknall (DevExpress)

@QUALCO SA: As stated, it's the grid only that supports DirectX. Also, the whole point about switching to DirectX is faster rendering, which is most beneficial for controls that occupy a big area of the screen. Small controls like standalone editors, not so much. That's not to say we won't make them support DirectX in the future, more that it makes sense to target "big" controls first: tree grid, vertical grid, scheduler, charting, what have you.

22 November, 2017
David Shannon

"first: tree grid...

That's what I wanted to hear...

25 November, 2017
Eaton Z.

Does this apply to the WinForms' grids carousel mode too? Was hoping to see some nice improvements there when clicking between items, but there is no discernible difference.

26 November, 2017
Erhan Gur

Very nice feature. We are waiting this for VCL scheduler.

27 November, 2017
Kervin Gomez M.

Julian, I've tested both GDI+ and DirectX WinForms Demos 17.2.4 and I can't see any difference with XtraGrid. Also opened source code from both and can't find the WindowsFormsSettings.ForceDirectXPaint method in the DirectX version. It's not called anywhere in the source code. Can you provide a sample project where we can see the difference?

14 December, 2017
Dmitry Babich (DevExpress)


In previous releases, we made a lot of optimizations in our GridControl. That's why it has great performance on regular screens even with the regular GDI+ engine.

To see the difference, I'd recommend using a 4K display and expanding a form with GridControl to make it occupy the entire screen. The bigger area for rendering you have, the bigger difference there is in performance between GDI and DirectX. This way, you will notice the difference when scrolling, for example.

As for the ForceDirectXPaint method call, we introduced command line support in our demos and call this method implicitly. We just run the same demo with the /directx parameter to switch the rendering engine to DirectX.

If you still have questions regarding DirectX, feel free to contact our support team. We will provide you with required code snippets.

14 December, 2017

Hi Julian,

That's very nice to hear! Glad you are still improving Winforms. We use Winforms extensively to display real-time data(financial market data, orders, trades, logs, etc.). It works and performs well for our needs. Simple and intuitive to program. This new feature will be a good option to try if we need to optimize rendering/scrolling performance in future.

One area where we face issues is custom group row summary calculation in XtraGrid when we use 5+ levels of grouping and 100+ columns, sorting and load layout operations become very slow, taking 5-15 seconds to complete. Also performance improvements for XtraTreeList control in terms of speed and memory usage when adding nodes and scrolling would be welcome.

But overall, want to take this opportunity to mention that DevExpress is a great toolkit for a Windows desktop applications developer. Thanks for all the work you do! It makes our lives much easier :) Thank you.

22 January, 2018
Eugene Paradizov

Please get XtraScheduler control's rendering implemented as DirectX, especially the timeline (gantt) view, and add pixel scrolling while you're at it. Having no pixel scrolling and slow rendering are the two biggest flaws at this point.

10 February, 2018

Hi Julian,

his is great, there is a big performance boost in the 17.2 demo app.

I would love to see it for the winforms layout control!

Best regards from germany,


14 April, 2018

Please login or register to post comments.