ChartControl implicit styles for the Dark theme

2 posts, 0 answers
  1. Ghasem
    Ghasem avatar
    15 posts
    Member since:
    May 2014

    Posted 25 Dec 2014 Link to this post

    Hi All, 
    About setting themes and styling WPF controls using implicit styles, I set Dark style to Rad controls successfully but about  RadChart , it doesn’t work. indeed  I set dark theme to RadChart successfully using  StyleManager.
    I apply implicit styles for the Dark theme in code below, 

    private static void SetTelerikTheme()
                //Style tbstyle = null;
                string themeName = "Expression_Dark";
                telerikResources = new List<ResourceDictionary>();
                AddTelerikTheme(themeName, "System.Windows.xaml");
                AddTelerikTheme(themeName, "Telerik.ReportViewer.Silverlight.xaml");
                AddTelerikTheme(themeName, "Telerik.Windows.Controls.Data.xaml");
                AddTelerikTheme(themeName, "Telerik.Windows.Controls.DataVisualization.xaml");
                AddTelerikTheme(themeName, "Telerik.Windows.Controls.Diagrams.Extensions.xaml");
                AddTelerikTheme(themeName, "Telerik.Windows.Controls.Diagrams.xaml");
                AddTelerikTheme(themeName, "Telerik.Windows.Controls.Docking.xaml");
                AddTelerikTheme(themeName, "Telerik.Windows.Controls.Expressions.xaml");
                AddTelerikTheme(themeName, "Telerik.Windows.Controls.FixedDocumentViewers.xaml");
                AddTelerikTheme(themeName, "Telerik.Windows.Controls.FixedDocumentViewersUI.xaml");
                AddTelerikTheme(themeName, "Telerik.Windows.Controls.GanttView.xaml");
                AddTelerikTheme(themeName, "Telerik.Windows.Controls.GridView.xaml");
                AddTelerikTheme(themeName, "Telerik.Windows.Controls.ImageEditor.xaml");
                AddTelerikTheme(themeName, "Telerik.Windows.Controls.Input.xaml");
                AddTelerikTheme(themeName, "Telerik.Windows.Controls.Navigation.xaml");
                AddTelerikTheme(themeName, "Telerik.Windows.Controls.Pivot.xaml");
                AddTelerikTheme(themeName, "Telerik.Windows.Controls.PivotFieldList.xaml");
                AddTelerikTheme(themeName, "Telerik.Windows.Controls.RibbonView.xaml");
                AddTelerikTheme(themeName, "Telerik.Windows.Controls.RichTextBoxUI.xaml");
                AddTelerikTheme(themeName, "Telerik.Windows.Controls.ScheduleView.xaml");
                AddTelerikTheme(themeName, "Telerik.Windows.Controls.Spreadsheet.xaml");
                AddTelerikTheme(themeName, "Telerik.Windows.Controls.xaml");
                AddTelerikTheme(themeName, "Telerik.Windows.Documents.Proofing.xaml");
                AddTelerikTheme(themeName, "Telerik.Windows.Documents.xaml");
                AddTelerikTheme(themeName, "Telerik.Windows.Controls.Chart.xaml");
                AddTelerikTheme(themeName, "Expression/Dark/ReportViewer.xaml");
                AddTelerikTheme(themeName, "Expression/Dark/ReportViewerDialogBox.xaml");
                AddTelerikTheme(themeName, "Expression/Dark/ReportViewerErrorStatus.xaml");
                foreach (var res in telerikResources)
            private static List<ResourceDictionary> telerikResources = new List<ResourceDictionary>();
            private static void AddTelerikTheme(string themeName, string dictionaryName)
                    telerikResources.Add(new ResourceDictionary()
                        Source = new Uri("/Telerik.Windows.Themes." + themeName + ";component/Themes/" + dictionaryName,
                catch (Exception ex)
                        dictionaryName + "\r\n" +
  2. Martin
    Martin avatar
    1042 posts

    Posted 25 Dec 2014 Link to this post

    Hi Ghasem,

    I am afraid that RadChart does not provide a support for implicit styling as stated in the second note in the Setting a Theme (Using Implicit Styles) help article. However, you can take a look at the new RadChartView suite instead. The new charting components have better implementation and improved performance. They are also very flexible and easy to set up compared to the RadChart control. You can read more about the differences between the components in the RadChart vs. RadChartView help article. If you are just starting to use a charting in your application I strongly recommend you to use RadChartView instead of the old chart control. One of the benefits from this decision will be better performance, also the new charting controls resolves many of the issues and limitations of RadChart.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. DevCraft R3 2016 release webinar banner
Back to Top