Author Topic: .Net palettes and dark theme  (Read 625 times)

0 Members and 1 Guest are viewing this topic.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 7485
  • AKA Daniel
.Net palettes and dark theme
« on: October 16, 2022, 06:44:17 AM »
Are .NET palettes themed out of the box or do you have to add some magic?
this one is in MFC, total pain  :crazy2:

Retired

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 7485
  • AKA Daniel
Re: .Net palettes and dark theme
« Reply #1 on: October 16, 2022, 06:45:07 AM »
in light mode
Retired

huiz

  • Swamp Rat
  • Posts: 902
  • Certified Prof C3D
Re: .Net palettes and dark theme
« Reply #2 on: October 17, 2022, 04:29:26 AM »
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.
The conclusion is justified that the initialization of the development of critical subsystem optimizes the probability of success to the development of the technical behavior over a given period.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 7485
  • AKA Daniel
Re: .Net palettes and dark theme
« Reply #3 on: October 17, 2022, 05:31:23 AM »
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?
Retired

huiz

  • Swamp Rat
  • Posts: 902
  • Certified Prof C3D
Re: .Net palettes and dark theme
« Reply #4 on: October 17, 2022, 06:02:39 AM »
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.
The conclusion is justified that the initialization of the development of critical subsystem optimizes the probability of success to the development of the technical behavior over a given period.

kdub

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 1509
  • class keyThumper<T>:ILazy<T>
Re: .Net palettes and dark theme
« Reply #5 on: October 17, 2022, 04:26:35 PM »
<< . . . >>

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

That's what she said :)
called Kerry in my other life

Sometimes the question is more important than the answer.

I don't really work crazy hours . . I just live at UTC + 13.00
#ridesober

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 7485
  • AKA Daniel
Re: .Net palettes and dark theme
« Reply #6 on: October 17, 2022, 05:51:53 PM »
<< . . . >>

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

That's what she said :)

LOL!  :lol:
Borrowed from Billy Crystal, itís better to look good, than to feel good..
Retired