How to adopt AutoCAD theme for the a custom palette control?

s_abeed
Enthusiast
Enthusiast

How to adopt AutoCAD theme for the a custom palette control?

s_abeed
Enthusiast
Enthusiast

I implemented a new palette control and want to know is there a magic way of applying darl or light theme to the new palette control?

0 Likes
Reply
Accepted solutions (1)
265 Views
1 Reply
Reply (1)

ActivistInvestor
Advisor
Advisor
Accepted solution

The theme information can be accessed with:

 

 

 

/// Requires a reference to AdUiPalettes.dll

Autodesk.Windows.Themes.ThemeManager.Instance.PaletteSettings.CurrentTheme;

 

 

 

It's up to you to set the appropriate properties on UI elements (e.g., Foreground/Background color, etc.) to the values contained in the PaletteTheme object returned by this method. There's no 'easy button'.