WinForms Deprecation Notice — Classic Visual Styles

WinForms Team Blog
06 July 2021

Many of our experienced customers know that you can use the DevExpress WinForms UserLookAndFeel API to enable "classic" visual styles ("Flat", "UltraFlat", "XP", etc.) for an individual control or an entire application. In this post, I’ll describe these "outdated" classic styles and explain why we have chosen to deprecate this API and to leave the "Skin" style as the only option.

The Case for Classic Styles


Let's take a moment and consider some of the reasons why a WinForms developer might be using a classic style like "Flat" or "Border3D" in 2021.

Performance

Each skin stores a large collection of raster or vector images painted above UI elements. If you disable skins and switch to a classic visual style, you could theoretically boost application performance (since UI elements will no longer need to retrieve and draw skin images).

In reality, the difference in performance between a skinned and a "Flat" application is negligible (given modern-day hardware performance). The availability of vector skins makes this concern moot — vector images are lightweight and consume less resources than their raster bitmap counterparts.

Remote Desktop Environments

There's a common myth among our user base that simple paint methods (responsible for flat appearance) are most effective in remote desktop environments. Truth is that all modern remote environments employ videostream encoding. Based on internal tests, vector images produce the best results in this environment. Said differently, we are 100% confident that our vector WinForms themes alongside our new OptimizeRemoteConnectionPerformance setting will deliver the best possible performance in remote environments – and will not sacrifice the overall appearance of your WinForms app.

Ease of Access

Our old "High Contrast" skin was raster image-based. This meant that it could not adapt to system settings. If you wanted your app to use colors from the "Personalize | High contrast settings" Windows menu, you had to enable our classic "Flat" style. While this style could retrieve colors from the active Windows High Contrast theme, certain controls (such as our Ribbon) retained their own unique appearance.

The good news is that with the release of v21.1, you can now use a vector-based High Contrast skin. This skin uses colors from the active Windows preset, and (unlike our classic "Flat" style) guarantees to deliver a unified appearance across all DevExpress WinForms UI controls.

Custom Highlight

Since skin images are painted directly above UI elements, certain usage scenarios prevented you from using an element’s Appearance settings (namely, the "BackColor" property). Disabling skins and switching to a classic style was the default technique for those who wanted to apply custom element appearance (for instance, to paint the "Cancel" SimpleButton red).

This "limitation” is no longer a limitation (v18.2+). With our v18.2 release, we made it possible to use Appearance settings even when a skin is active. To learn more, please review the following blog post from a couple of years ago: Skin Colors and LookAndFeel.

Personal Preferences

Tastes differ, and yes, some people prefer the "unskinned" retro look and feel. The good news is that you can deliver the “retro” look with DevExpress vector skins. Our vector skins include dozens of color variations (palettes), including simplified "gray-ish" color options.


As we’ve hopefully illustrated in this post, the case for classic styles and "unskinned" apps is not what it once was. This reality notwithstanding, you may be asking yourself why? Why deprecate a long-standing feature such as classic styles?

The simple answer to this question is that legacy style settings and some of our newest features are not compatible. For example, in-header filters for the DevExpress WinForms Data Grid do not work correctly when the UserWindowsXPTheme setting is active. In addition, each time we introduce a new feature such as in-header filters, we are forced to rewrite individual control painters. Supporting a legacy feature such as classic styles is expensive and in certain instances, produces unacceptable results (for instance, the XP theme does not look great on high-DPI devices).

What's Next

Removing an entire customization API layer is a big step and we won't rush into it. For now, we are going to stop fixing bugs related to classic styles. We will eventually deprecate these legacy settings so they do not produce issues similar to those related to in-header column filtering.

Of course, we definitely want to hear from you. If you're currently using "XP" or "Style3D" and wish to do so indefinitely, please share your thoughts in the comment section below. Tell us your concerns and your needs. We will listen to all of your concerns and do our best to find a reasonable solution suitable for everyone.

FREE DevExpress Xamarin UI Controls

Deliver high-impact native mobile apps with our feature-rich Data Grid, Scheduler, Chart, TabView, Editors, and utility controls. Reserve your free copy today!
Alex Miller
Alex Miller

Hi Dmitry,


Any news on "We also expect to move outdated raster skins into our Bonus Skins library." that was mentioned in the 2020 roadmap Windows Forms Controls - 2020 Roadmap (devexpress.com)?

Thanks,

Alex

6 July 2021
Robert Schlesinger
Robert Schlesinger
How to use then RepositoryItemBaseProgressBar.StartColor and EndColor as in help:
"The colors specified by the RepositoryItemBaseProgressBar.StartColor and RepositoryItemBaseProgressBar.EndColor properties are only in effect if the progress bar is painted using the Flat, UltraFlat or Style3D style. To change the progress bar’s look and feel settings, use the RepositoryItem.LookAndFeel property."
6 July 2021
Joachim Thiele
Joachim Thiele
Do I understand it correctly, so only vector skins will remain, the bonus skins (like Money Twins, Office 2013) will be removed?
6 July 2021
Dmitry (DevExpress)
Dmitry (DevExpress)
@Robert Thank you for the hint, we'll make sure properties like these will keep working.
6 July 2021
Dmitry (DevExpress)
Dmitry (DevExpress)

@Alex Miller Hi, yes this task is still on our "to do" list. We try to avoid making big changes without a reason. The closest possible "reason" to overhaul our skin library would be the next Office 2022 skin, so probably we'd move our outdated raster skins to the BonusSkins library along with releasing this new theme.


@Joachim Thiele Don't worry, all raster skins are going to stay. Even when these skins move to the BonusSkins library, you will be able to use them. Yes, we think vector skins are far more superior and would recommend them over old raster skins any day of the week. But at the same time we know there're still plenty of customers who utilize these themes and we have no plans to get rid of them.

6 July 2021
Joachim Thiele
Joachim Thiele

@Dmitry (DevExpress)

Thank you for the answer. I agree that the vector skins are the better ones.
In practice, however, I see that in 80% of the cases, customers who use my software have "old" skins such as Office 2007, Money Twins or similar.
I often talk to customers and they tell me that these skins are simply easier to read / clearer. I can partly understand this and can also give examples.

You simply don't have to put a young programmer in front of it, but also people aged 45-60.

6 July 2021
Alex Miller
Alex Miller
@Dimitry Hopefully with the next skin overhaul you do for the Office 2022 skin you will also split each skin in a separate DLL so we can ship with only those we need? 🤞
6 July 2021
Robert Schlesinger
Robert Schlesinger

For me the only outstanding issue is with  RepositoryItemBaseProgressBar.StartColor and EndColor as I already mentioned above.


Color issues with buttons I fixed in v20.2.7 by setting assigned StyleController.BorderStyle=BorderStyles.Style3D

Issues with panels BackColor fixed by setting .BorderStyle=None

Issues with XtraTabControl tabheaders back and forecolors fixed by .PaintStyleName=Flat


7 July 2021
Sven H
Sven H

Our application was used on different Windows versions (XP/7/8/10) and our goal was to use an almost native view. So we didn't used skins except for control which need a skin like the Scheduler. In this case we use the Office skins.

We have mixed DevExpress controls and native .NET controls, and use a lot of custom drawing with user customizable colors. So a full skinnable application would be some work I guess...


12 July 2021
Heiko Mueller
Heiko Mueller
An easy way to assign a different palette to one or more controls in a form would be what i need most... I have sometimes a mix between 'light' and 'dark' controls in a single form (for example:  anything in a form is 'light' but there is also a slight out panel which is skinned 'dark' - for extra contrast if its slided out). At the moment there is no easy way to accomplish this task...
13 July 2021

Please login or register to post comments.