How do we access theme colors ?

1
0

For example I can use System.Drawing.Color.FromKnownColor(System.Drawing.KnownColor.ButtonFace)

But how do i get to System.Drawing.Color.FromKnownColor(System.Drawing.KnownColor.primary ? which is a theme color ?

  • edmond girardi
    Some of the colors are there but not all for some reason
  • You must to post comments
0
0

Application.Theme…. methods. For example, Application.Theme.GetColor(“inactiveBorder”).

Another way is Color.FromName(“@inactiveBorder”). Adding the @ prefix to a color or font name means it’s a name defined in the theme. However, in this case the RGB values will be invalid since it’s only used for rendering back to the client.

You can also read icons, fonts, values assigned to specific appearance keys and states.

It’s used in the Wisej.ResponsiveNavigationPanel samples.

Also look for: https://docs.wisej.com/api/wisej.core/general/wisej.core.clienttheme

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.