This is a migrated thread and some comments may be shown as answers.

Windows8Palette: Changing color for a window

3 Answers 54 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
caleb
Top achievements
Rank 1
caleb asked on 17 Nov 2016, 12:39 PM

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

3 Answers, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 22 Nov 2016, 09:54 AM
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.
0
caleb
Top achievements
Rank 1
answered on 27 Nov 2016, 02:53 AM

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

Cheers,

Caleb

0
caleb
Top achievements
Rank 1
answered on 27 Nov 2016, 02:43 PM

Hello there,

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

Thanks so much,

Caleb

Tags
General Discussions
Asked by
caleb
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
caleb
Top achievements
Rank 1
Share this question
or