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

Getting the current Theme name

1 Answer 40 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Robin Verhulst
Top achievements
Rank 1
Robin Verhulst asked on 22 Apr 2010, 03:57 PM
I recently implemented the solution for changing the themes in runtime.
Now i need to change the color of my Radtreeview etc  with it .
Therefor i want something like
SolidColorBrush nieuw; 
            switch (StyleManager.ApplicationTheme.ToString()) 
            { 
                case "Blue": 
 
                    nieuw = new SolidColorBrush(Color.FromArgb(255, 221, 236, 253)); 
                    tvAssetOverview.Background = nieuw;; 
                    break; 
                case "Black": 
                    nieuw = new SolidColorBrush(Color.FromArgb(255, 213, 213, 213)); 
                    tvAssetOverview.Background = nieuw
                    break; 
                case "Silver": 
                    nieuw = new SolidColorBrush(Color.FromArgb(255, 210, 213, 232)); 
                    tvAssetOverview.Background = nieuw
                    break; 
                case "Summer": 
                    nieuw = new SolidColorBrush(Color.FromArgb(255, 225, 227, 228)); 
                    tvAssetOverview.Background = nieuw
                    break; 
                case "Vista": 
                    nieuw = new SolidColorBrush(Color.FromArgb(255, 225, 227, 228)); 
                    tvAssetOverview.Background = nieuw
                    break; 
                case "Windows 7": 
                    nieuw = new SolidColorBrush(Color.FromArgb(255, 219, 230, 244)); 
                    tvAssetOverview.Background = nieuw
                    break; 
                default: 
                    break; 
            } 

But to do this i need somethings that returns the current theme name cause
            switch (StyleManager.ApplicationTheme.ToString()) 
does not work , neither does this.Style.ToString()

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 26 Apr 2010, 04:00 PM
Hi Robin Verhulst,

Theme names are Office_Black, Office_Blue, Office_Silver, Summer, Vista and Windows7.

Let us know if you need more help.

Kind regards,
Hristo
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.
Tags
General Discussions
Asked by
Robin Verhulst
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or