Code Red > .NET

.Net palettes and dark theme

(1/2) > >>

It's Alive!:
Are .NET palettes themed out of the box or do you have to add some magic?
this one is in MFC, total pain  :crazy2:

It's Alive!:
in light mode

huiz:
As far as I know there is no auto theming. You have to create two themes yourself (basically 2 AppStyles) which you switch on the COLORTHEME variable change.


But... there are two dark themes needed when you want to mimic the current AutoCAD colors, the first dark theme was changed a bit somewhere around AutoCAD 2019? or 2020?


And designing dark themes in WPF is quite a job. You have to write all ControlTemplates because the default MouseOver colors are not the same colors as used in AutoCAD. Also you need two sets of icons when they looks ugly with a dark or light background.


For what it's worth, our company only uses the light theme design only and I never heard a user ask for a dark theme.

It's Alive!:
I was wondering about WPF and setting control colors
.NET has Autodesk.AutoCAD.Internal.ActiveThemeColor and ThemeEngine, I haven’t tried them yet


ARX has a theme manager i.e.

CAdUiThemeManager* pThemeManager = AdUiGetThemeManager();
CAdUiTheme* pTheme = pThemeManager->GetTheme(L"PropertyPalette");

Has an IsDark method, and you can grab the BKColor or TxtColor;
Some of the Autodesk CAdUi MFC controls have a SetTheme method,  but I’m still trying to figure it out lol

It’s better to look good, than to work good, right?

huiz:
The ActiveThemeColor and the ThemeEngine are of no use, afaik. Probably you can find a PaletteBackground color but that's all. No methods to update buttons, controls, images or another UI element.


So, to support light and dark mode you still have to create two style XAML files and switch between them when the COLORTHEME var is changing.

Navigation

[0] Message Index

[#] Next page

Go to full version