Problem in applying theme dynamically

2 posts, 0 answers
  1. SivaPrasad Bevara
    SivaPrasad Bevara avatar
    73 posts
    Member since:
    Oct 2012

    Posted 17 Aug 2010 Link to this post

    Hi,

    I am using the following code to apply theme dynamically on mouseover of rectangular color box.

    Telerik.Windows.Controls.StyleManager.ApplicationTheme = new Theme( Uri( "/Telerik.Windows.Themes.CustomTheme;component/Themes/Generic.xaml", UriKind.Relative ) );

    I have created 2 similar custom themes with 2 different colors. In the Xaml page constructor before the Initialize() method, I am loading one theme and it is applied properly. I am trying change the theme on mouseover of a rectagular color box but it is not changing the Theme.

    Please help me.

    Thanks in advance,
    SivaPrasad.B

  2. Dani
    Admin
    Dani avatar
    848 posts

    Posted 18 Aug 2010 Link to this post

    Hello SivaPrasad Bevara,

    Thank you for contacting us.

    You need to change the application theme at runtime , which is a more complicated process than using a mouseover event. In order for the new theme to be applied to your controls, they need to be recreated on the screen.

    Please check this blog post related to the dynamic switch of application themes. Also, check this forum thread for more details.

    I hope this information helps.

    All the best,
    Dani
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
Back to Top