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

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

s_abeed
Enthusiast Enthusiast
406 Views
1 Reply
Message 1 of 2

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
Accepted solutions (1)
407 Views
1 Reply
Reply (1)
Message 2 of 2

ActivistInvestor
Mentor
Mentor
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'.