Windows8Palette: Changing color for a window

4 posts, 0 answers
  1. caleb
    caleb avatar
    31 posts
    Member since:
    Sep 2011

    Posted 17 Nov 2016 Link to this post

    Hello there,

    I'm working on some style updates and have been using this work to streamline the styles into as many defaults as possible.  I've found out that I can take the Windows8Palette and set the Basic and Main colors and accomplish most of what I need.  This saves me lots of time digging though styles.  So I really like that.  I'm running into an issue where I'm opening a PDF in a new window and want to restore the default settings in the Windows8Palette.  I save the Basic and Default colors at startup.  So restoring them when the new window opens is easy enough.  The problem that I'm running into is that Windows8Palette.Palette.<Color> is that I'm updating a static.  So the colors change in the app.  How do I get just the colors in the new window to change?  I can always grab the style and build out a basedon style.  However, I want to do this with the smallest amount of maintenance for the future.  What's the best way to accomplish this or fewest lines of code?

    Thanks for your insight on this,

    Caleb

  2. Evgenia
    Admin
    Evgenia avatar
    1431 posts

    Posted 22 Nov 2016 Link to this post

    Hi Caleb,

    I'll try to summarize what I understood from your post so that I ensure that we are on the same page.
    You are successfully changing the Windows8Palette's colors by using the approach we recommend in our documentation -- by setting custom values for the color properties of the Palette object. What happens next is that at some point (for example on a new popup or window you want these colors to be different but if you just change them the way you did this will affect your whole application as the Palette is a global singleton). Unfortunately there's no easy way to accomplish color variation of the theme per control/window only. This was already discussed on another thread stating so I really recommend that you look into it and the proposed solution.

    Regards,
    Evgenia
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. caleb
    caleb avatar
    31 posts
    Member since:
    Sep 2011

    Posted 26 Nov 2016 in reply to Evgenia Link to this post

    Thanks!  I'll be reviewing the thread that you mentioned.

    Cheers,

    Caleb

  4. caleb
    caleb avatar
    31 posts
    Member since:
    Sep 2011

    Posted 27 Nov 2016 in reply to caleb Link to this post

    Hello there,

    I was able to use the VisualStudio2013 theme.  This was a great idea.

    Thanks so much,

    Caleb

Back to Top