change settings in current application theme

0
0

Hi,

I need to change settings for  Wisej.Web.MonthCalendar on current loaded Theme. I don’t want to edit the theme (I’ve already done that, but users change theme at runtime). I want to write a function (c#) to change at runtime, no matter what theme is loaded, the backcolor, forecolor, etc for Wisej.Web.MonthCalendar BoldedDates.

It is a post with BoldedDates.zip, and that theme works perfect. I need to make those changes by code.

Can anyone help?

 

I attached a printscreen with location of what I want to do in Theme editor.

  • You must to post comments
0
0

Hi Adrian,

please find documentation about mixins here

https://docs.wisej.com/theme-builder/getting-started/edit-a-mixin

Best regards
Frank

  • Adrian Zagar
    Hi Frank, Now that I know how to edit it, please instruct me how to use it in code.
  • You must to post comments
0
0

You can do this by using a theme mixin.

{
"name": "calendarmixin",
"appearances": {
"datechooser": {
"components": {
"day": {
"states": {
"bolded": {
"styles": {
"css": "{\"font-weight\":\"900 !important\", \"overflow\":\"visible !important\",\"display\":\"flex\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}",
"backgroundColor": "lightgreen"
},
}
}
}
}
}
}
}

The theme mixin will only override part of the theme, allowing users to change the theme and always see the green background on bolded dates.
For more information on theme mixins see here: https://docs.wisej.com/theme-builder/getting-started/edit-a-mixin

  • Adrian Zagar
    I found no/little documentation on how a mixin theme looks like. Or how to really use it. Do I have to save the json text you provided as a file (like calendarbold.mixin.theme)? And how to load it? And how to ensure that will always load when a user call Application.LoadTheme(…)? Thank you.
  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.