Hi,
I'm customizing the UI as per my requirements. Now, I want to change the LTR to RTL at runtime. I found that themesetting.json can do that switching. But It doesn't do on runtime. How can I make it? Please give me complete instructions for this problem.
It would be a great thing if you responded with this question.
Regards
Nabeeh T
Hi,
Thank you for reaching out to us.
In themessetting.json you can set a default theme mode if you want to switch mode dynamically you should use KTTheme.SetDirection("RTL").
Please keep in mind, that this value will be overridden with value from config on page refresh to have the selected mode you need to store the user's selected mode in the cookies or your database and then inside Starterkit/_keenthemes/KTBootstrapBase.cs inside function initThemeDirection you can set saved value.
Regards,
Lauris Stepanovs,
Keenthemes Support Team
Hello,
Thank You for your attention.
I already tried this by using KTTheme.SetDirection("RTL"). I'm little confused about changing the UI at runtime. It didn't trigger the initThemeDirection. What I want to do now!? I already said that am a Noobie in blazor. So, please reply with detailed answers with Attatchment if it is possible.
Regards,
Nabeeh T
Hi,
Sorry for the late reply.
The initThemeDirection is triggered on page refresh and by default it sets direction from theme configuration. You can reuse this function and when user changes direction you can write user's selected direction to the session and then set the direction from the session in this function.
Do you have any errors when you are using KTTheme.SetDirection?
Regards,
Lauris Stepanovs,
Keenthemes Support Team