Skip to content

How do we access theme colors ? #1289

Closed

Description

@itg-assistant

edmond girardi asked 2018-01-04 19:48:44 UTC

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 ?

Activity

  1. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    edmond girardi answered 2018-01-04 22:02:19 UTC

    Some of the colors are there but not all for some reason

  2. itg-assistant commented on Jun 12, 2026

    @itg-assistant
    Author

    Luca answered 2018-01-05 01:19:57 UTC

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    GeneralQuestions, how-tos and everything else.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions