Getting the current Theme name

2 posts, 0 answers
  1. Robin Verhulst
    Robin Verhulst avatar
    6 posts
    Member since:
    Apr 2010

    Posted 22 Apr 2010 Link to this post

    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()
  2. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 26 Apr 2010 Link to this post

    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.
Back to Top