Telerik Forums
UI for WPF Forum
1 answer
117 views

Hi!

 

My english is not as good as I would like but I expect to be clear.

 

We have been testing testing telerik charts with Telerik 2011.2.920.35. We have detected performance issues when working with many data series in live time.

 

Our worst scenario in one RadChart is:

  • Datetime XAxis
  • 15 Line series (we prefer Spline series but its performance ir really poor)
  • 15 YAxis
  • 60 Scatter series (each line serie needs 4 scatter serie to represent related data). Number of DataPoints depends on data
  • Annotations (Number depends on data)
  • Custom tooltip for each datapoint of each data serie
  • Show data of 1 hour (but can be more)
  • First load of 15 lines * 1 hour * 60 minutes * 6 periods of 10 seconds produces 5400 datapoints
  • Data refresh each 10 seconds

 

We have made a simple test project and we have seen performance issues (just resizing the window you can see the problem):

  • Spline series locks the application
  • Adding scatter series makes the application go slower
  • Adding line series makes the application go slower

 

We have detect that you can not use AddRange to DataSerie twice. The first time it runs ok but the second time it doesn’t render the serie as it should.

 

We have seen Performance Tips and Tricks for RadChart (http://www.telerik.com/help/silverlight/radchart-performance-tips-and-tricks.html) but they are not enough for our scenario.

 

We have seen that in Q3 beta you have been working on Charts (http://blogs.telerik.com/blogs/posts/11-10-21/telerik-xaml-controls-q3-2011-beta-introduces-new-and-empowered-chartingkit.aspx). We haven’t been able to test it yet. Are this problems solved?

 

Is our scenario requirements more than Telerik RadChart can support?

 

Our test code is:

MainWindow.xaml

 

<Window x:Class="TestDataSeries.MainWindow"

        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 

        xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting" 

        xmlns:Charting="clr-namespace:Telerik.Windows.Controls.Charting;assembly=Telerik.Windows.Controls.Charting" Title="MainWindow" Height="350" Width="525">

    <Grid>

        

        <Grid.RowDefinitions>

            <RowDefinition Height="*" />

            <RowDefinition Height="Auto" />

            <RowDefinition Height="Auto" />

            <RowDefinition Height="Auto" />

        </Grid.RowDefinitions>

        

        <telerik:RadChart x:Name="VariableChart"

                              AxisElementBrush="White" AxisForeground="White" Foreground="White" 

                              Background="Black">

            <telerik:RadChart.DefaultView>

                <Charting:ChartDefaultView>

                    <Charting:ChartDefaultView.ChartArea>

                        <Charting:ChartArea Background="Black">

                        </Charting:ChartArea>

                    </Charting:ChartDefaultView.ChartArea>

                </Charting:ChartDefaultView>

            </telerik:RadChart.DefaultView>

        </telerik:RadChart>

 

        <Button Content="New Line serie" Click="CreateNewLine" Grid.Row="1"></Button>

        <Button Content="New Spliline serie" Click="CreateNewSpliline" Grid.Row="2"></Button>

        <Button Content="New Scatter serie" Click="CreateNewScatter" Grid.Row="3"></Button>

 

    </Grid>

</Window>

 

MainWindow.xaml.cs

 

using System;
using System.Collections.ObjectModel;
using System.Windows;
using System.Windows.Media;
using System.Windows.Threading;
using Telerik.Windows.Controls.Charting;
 
namespace TestDataSeries
{
    /// <summary> 
    /// Interaction logic for MainWindow.xaml 
    /// </summary> 
    public partial class MainWindow : Window 
    {
 
        private Random _random = new Random();
        private DateTime _beginDate;
 
        public MainWindow()
        {
            InitializeComponent();
            _beginDate = DateTime.Now.AddHours(-1);
            SetUpRadChart();
            SetUpXAxis();
            SetUpTimer();
        }
 
        public DispatcherTimer Timer { getset; }
        
        private void SetUpRadChart()
        {
            VariableChart.DefaultView.ChartTitle.Visibility = Visibility.Collapsed;
            VariableChart.DefaultView.ChartLegend.Visibility = Visibility.Collapsed;
            VariableChart.DefaultView.ChartArea.IsNoDataMessageEnabled = false;
            VariableChart.DefaultView.ChartArea.NoDataString = "No data";
            VariableChart.DefaultView.ChartArea.EnableAnimations = false;
            VariableChart.DefaultView.ChartArea.ZoomScrollSettingsX.ScrollMode = ScrollMode.None;
            VariableChart.DefaultView.ChartArea.ZoomScrollSettingsY.ScrollMode = ScrollMode.None;
            VariableChart.DefaultView.ChartArea.AxisY.Visibility = Visibility.Collapsed;
            VariableChart.DefaultView.ChartArea.AxisY.StripLinesVisibility = Visibility.Collapsed;
        }
 
        private void SetUpTimer()
        {
            Timer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(10) };
            Timer.Tick += Timer1Tick;
        }
 
        private void Timer1Tick(object sender, EventArgs e)
        {
            foreach (var dataSerie in VariableChart.DefaultView.ChartArea.DataSeries)
            {
                //var pointList = new ObservableCollection<DataPoint>(); 
                //pointList.Add(new DataPoint(DateTime.Now.ToOADate(), _random.NextDouble())); 
                //This code doesn't run as expected!!!!!!!!!!!!!!! It appears to be the same as dataSerie.Add but it is not 
                //dataSerie.AddRange(pointList); 
                dataSerie.Add(new DataPoint(DateTime.Now.ToOADate(), _random.NextDouble()));
            }
        }
 
        private void SetUpXAxis()
        {
            VariableChart.DefaultView.ChartArea.AxisX.DefaultLabelFormat = "#VAL{yyyy-MM-dd HH:mm:ss}";
            VariableChart.DefaultView.ChartArea.AxisX.LabelRotationAngle = 270;
            VariableChart.DefaultView.ChartArea.AxisX.Title = "Time";
            VariableChart.DefaultView.ChartArea.AxisX.LayoutMode = AxisLayoutMode.Normal;
            VariableChart.DefaultView.ChartArea.AxisX.AutoRange = true;
            VariableChart.DefaultView.ChartArea.AxisX.IsDateTime = true;
        }
 
        private void CreateNewLine(object sender, RoutedEventArgs e)
        {
            CreateDataSerie();
            if (VariableChart.DefaultView.ChartArea.DataSeries != null && VariableChart.DefaultView.ChartArea.DataSeries.Count == 1)
                Timer.Start();
                
        }
 
        public void CreateDataSerie()
        {
            DataSeries dataSerie = new DataSeries();
            dataSerie.Definition = new LineSeriesDefinition();
            (dataSerie.Definition as LineSeriesDefinition).ShowPointMarks = false;
            (dataSerie.Definition as LineSeriesDefinition).Appearance.PointMark.Shape = MarkerShape.Circle;
            (dataSerie.Definition as LineSeriesDefinition).Appearance.PointMark.Fill = Brushes.Orange;
            (dataSerie.Definition as LineSeriesDefinition).ShowItemLabels = false;
            (dataSerie.Definition as LineSeriesDefinition).ShowItemToolTips = false;
 
            var pointList = new ObservableCollection<DataPoint>();
 
            var timerange = (DateTime.Now - _beginDate).TotalSeconds;
            var periods = timerange/10;
            for (int i = 0; i < periods; i++)
            {
                pointList.Add(new DataPoint(_beginDate.AddSeconds(i * 10).ToOADate(), _random.NextDouble()));
            }
            dataSerie.AddRange(pointList);
 
            VariableChart.DefaultView.ChartArea.DataSeries.Add(dataSerie);
        }
 
        private void CreateNewScatter(object sender, RoutedEventArgs e)
        {
            CreateScatterDataSerie();
        }
 
        public void CreateScatterDataSerie()
        {
            DataSeries dataSerie = new DataSeries();
            dataSerie.Definition = new ScatterSeriesDefinition();
            (dataSerie.Definition as ScatterSeriesDefinition).Appearance.PointMark.Shape = MarkerShape.Circle;
            (dataSerie.Definition as ScatterSeriesDefinition).Appearance.PointMark.Fill = Brushes.Orange;
            (dataSerie.Definition as ScatterSeriesDefinition).ShowItemLabels = false;
            (dataSerie.Definition as ScatterSeriesDefinition).ShowItemToolTips = false;
 
            var pointList = new ObservableCollection<DataPoint>();
 
            var timerange = (DateTime.Now - _beginDate).TotalSeconds;
            var periods = timerange / 10;
            for (int i = 0; i < periods; i++)
            {
                pointList.Add(new DataPoint(_beginDate.AddSeconds(i * 10).ToOADate(), _random.NextDouble()));
            }
            dataSerie.AddRange(pointList);
 
            VariableChart.DefaultView.ChartArea.DataSeries.Add(dataSerie);
        }
 
        private void CreateNewSpliline(object sender, RoutedEventArgs e)
        {
            CreateSplineDataSerie();
        }
        public void CreateSplineDataSerie()
        {
            DataSeries dataSerie = new DataSeries();
            dataSerie.Definition = new SplineSeriesDefinition();
            (dataSerie.Definition as SplineSeriesDefinition).ShowPointMarks = false;
            (dataSerie.Definition as SplineSeriesDefinition).Appearance.PointMark.Shape = MarkerShape.Circle;
            (dataSerie.Definition as SplineSeriesDefinition).Appearance.PointMark.Fill = Brushes.Orange;
            (dataSerie.Definition as SplineSeriesDefinition).ShowItemLabels = false;
            (dataSerie.Definition as SplineSeriesDefinition).ShowItemToolTips = false;
 
            var pointList = new ObservableCollection<DataPoint>();
 
            var timerange = (DateTime.Now - _beginDate).TotalSeconds;
            var periods = timerange / 10;
            for (int i = 0; i < periods; i++)
            {
                pointList.Add(new DataPoint(_beginDate.AddSeconds(i * 10).ToOADate(), _random.NextDouble()));
            }
            dataSerie.AddRange(pointList);
 
            VariableChart.DefaultView.ChartArea.DataSeries.Add(dataSerie);
        }
    }
}

 

 

Thank you!

Yavor
Telerik team
 answered on 09 Nov 2011
1 answer
508 views
I am trying to use the RadRichTextBox control. I know this error has a posting in the forums but I need to know what is the minimum version of the telerik.windows.control, telerik.windows.data, and telerik.windows.documents for .net 4.0--as we are using the .net 4 version of system.componentmodel.composition for our project.

I am using control version 2011.2.920.35, data version 2011.2.920.35, documents version 2011.2.920.35 and the componentmodel is 4.0.0.0. I got this info from properties for each file in my project.
Iva Toteva
Telerik team
 answered on 09 Nov 2011
2 answers
97 views
Hello,

I want to display multiple series on RadChart, say 2 lines, where X-axis is DateTime.

The data could be something like (note that date is formatted as dd.MM.yyyy):

Series 1:
Date - value
01.01.2011 - 10.2 €
01.02.2011 - 96.7 €
...
01.01.2012 - 17.9 €

Series 2:
Date - value
01.05.2011 - 12.2 €
01.06.2011 - 91.2 €
...
01.02.2012 - 12.5 €

The series min start is 01.01.2011 (series1) and max end is 01.02.2012 (series2)

Is it possible to have x-axis only show ticks from start to the end of the period (series1 -> series2) with one tick being one month exacly ? In other words, I want the x-axis to show months between the range of data. How would that be achievable ?

This is quite urgent, please advice.

Thanks!
Evgenia
Telerik team
 answered on 09 Nov 2011
6 answers
413 views
If I update the Resources for my ResourceType, the view only changes if I flip from one ViewDefinition to another and back again. How can I have the view update with the new resources without having to toggle the active view?

Thanks,
Rod
Rosi
Telerik team
 answered on 09 Nov 2011
1 answer
60 views
Hello, I have two GridView in the same WPF windows, I would like to fill the sencond gridview with information that depend of the first gridview ... and I would not like to use Hierarchical, just when somebody click on a row in the first gridview, the second refresh automaticaly with some data ... how can I do it if I am using mvvm and I have a propertie that has those values???

Employment -> that it is binding in the fist gridview (have the name and the surname)

Employment.ComplexData. -> that I would like to binding to the second Gridview and have more data of the employment.

Any simple example please?

Thanks a lot
Vlad
Telerik team
 answered on 09 Nov 2011
7 answers
202 views
I thought I'd had this working a couple months ago, but apparently not.  Here's the situation.  I have a Master-Detail situation similar to a Customers->Orders->Line Items.

I'd like to use two grids to display information regarding Customers and related information.  On the left I have a RadGridView showing all my Customers.  On the right, I have a grid that I'd like to use to display the detail information using hierarchical grids.  In the Customers grid I'd select a row, and in the Details grid I'd see the records associated with a single customer:

<selected Customer>|    |<Selected Customer add'l details>
Customer 2         |    |  <Order 1>
Customer n         |    |    <Line Item 1>
                   |    |    <Line Item n>
                   |    |  <Order 2>
                   |    |    <Line Item 1>
                   |    |    <Line Item n>


                         The left-hand grid is fine, for the life of me I can't get anything to display in the right-hand grid.  I do have a standalone hierarchical grid that shows everything ok, so presumably I'm doing something wrong with the ItemsSource/Binding/... in the right-hand grid.  If it makes a difference, the data is all in CollectionViewSources using Entity Framework data.  

I've gone through the examples and haven't found anything that's helped me with this particular situation.  Do you have any examples or suggestions?

Thanks very much.
Lynne
Top achievements
Rank 1
 answered on 08 Nov 2011
8 answers
287 views
I have this GridView that looks like this.

<tg:RadGridView
        tc:RadDockPanel.Dock="Top"
        ItemsSource="{Binding Steps}"
        SelectedItem="{Binding CurrentSelectedStep, Source={x:Static SizingApp:ProjectManager.Instance}, Converter={StaticResource PSSpecConverter}, Mode=TwoWay}"
        Style="{StaticResource RadGridViewStyle}"
        RowLoaded="RadGridView_RowLoaded">
    <tg:RadGridView.ChildTableDefinitions>
        <tg:GridViewTableDefinition>
            <tg:GridViewTableDefinition />
        </tg:GridViewTableDefinition>
    </tg:RadGridView.ChildTableDefinitions>
    <tg:RadGridView.HierarchyChildTemplate>
        <DataTemplate>
            <tg:RadGridView
                    ItemsSource="{Binding Loads}"
                    SelectedItem="{Binding CurrentSelectedLoad, Source={x:Static SizingApp:ProjectManager.Instance}, Converter={StaticResource PSSpecConverter}, Mode=TwoWay}"
                    Style="{StaticResource RadGridViewStyle}">
                <tg:RadGridView.Columns>
                    <tg:GridViewDataColumn DataMemberBinding="{Binding Name}"
                            Header="{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=StepSummary_LoadColumn_Header}"
                            TextAlignment="Left" />
                    <tg:GridViewDataColumn DataMemberBinding="{Binding Abbreviation}"
                            Header="{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=StepSummary_TypeColumn_Header}"
                            TextAlignment="Left" />
                    <tg:GridViewDataColumn DataMemberBinding="{Binding Quantity}"
                            Header="{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=StepSummary_QuantityColumn_Header}"
                            TextAlignment="Center" />
                    <tg:GridViewDataColumn DataMemberBinding="{Binding RunningKVA, StringFormat={}{0:F2}}"
                            Header="{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=StepSummary_RunningKVAColumn_Header}"
                            TextAlignment="Right" />
                    <tg:GridViewDataColumn DataMemberBinding="{Binding RunningKW, StringFormat={}{0:F2}}"
                            Header="{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=StepSummary_RunningKWColumn_Header}"
                            TextAlignment="Right" />
                    <tg:GridViewDataColumn DataMemberBinding="{Binding StartingKVA, StringFormat={}{0:F2}}"
                            Header="{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=StepSummary_StartingKVAColumn_Header}"
                            TextAlignment="Right" />
                    <tg:GridViewDataColumn DataMemberBinding="{Binding StartingKW, StringFormat={}{0:F2}}"
                            Header="{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=StepSummary_StartingKWColumn_Header}"
                            TextAlignment="Right" />
                    <tg:GridViewCheckBoxColumn DataMemberBinding="{Binding IsNonLinear}"
                            Header="{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=StepSummary_NonLinearColumn_Header}" />          
                </tg:RadGridView.Columns>
            </tg:RadGridView>
        </DataTemplate>
    </tg:RadGridView.HierarchyChildTemplate>
    <tg:RadGridView.Columns>
        <tg:GridViewDataColumn DataMemberBinding="{Binding Name}"
            Header="{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=ProjectSummary_StepColumn_Header}"
            TextAlignment="Left" />
        <tg:GridViewDataColumn DataMemberBinding="{Binding VoltageDip, StringFormat={Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=VoltageDipFormat}}"
            Header="{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=ProjectSummary_VoltageDip_Header}"
            TextAlignment="Center"/>
        <tg:GridViewDataColumn DataMemberBinding="{Binding RunningKVA, StringFormat={}{0:F2}}"
            Header="{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=ProjectSummary_RunningKVAColumn_Header}"
            TextAlignment="Right"/>
        <tg:GridViewDataColumn DataMemberBinding="{Binding RunningKW, StringFormat={}{0:F2}}"
            Header="{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=ProjectSummary_RunningKWColumn_Header}"
            TextAlignment="Right"/>
        <tg:GridViewDataColumn DataMemberBinding="{Binding StartingKVA, StringFormat={}{0:F2}}"
            Header="{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=ProjectSummary_StartingKVAColumn_Header}"
            TextAlignment="Right"/>
        <tg:GridViewDataColumn DataMemberBinding="{Binding StartingKW, StringFormat={}{0:F2}}"
            Header="{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=ProjectSummary_StartingKWColumn_Header}"
            TextAlignment="Right"/>
        <tg:GridViewDataColumn DataMemberBinding="{Binding RunningKVASum, StringFormat={}{0:F2}}"
            Header="{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=ProjectSummary_RunningKVASumColumn_Header}"
            TextAlignment="Right"/>
        <tg:GridViewDataColumn DataMemberBinding="{Binding RunningKWSum, StringFormat={}{0:F2}}"
            Header="{Resx ResxName=PSSPECApplication.Controls.ProjectControlResources, Key=ProjectSummary_RunningKWSumColumn_Header}"
            TextAlignment="Right"/>
    </tg:RadGridView.Columns>
</tg:RadGridView>

I've been trying to get this to have the rows be expanded after binding if there are Loads within Steps. However I can't figure out how to make them Expended by Default, and how to hide the IsExpandable click opener when there are no Loads within Steps. In the help file, it shows how to enable and disable IsExpandable on RowLoaded event. However, when binding occurs, nothing is updated as the RowLoaded doesn't fire. Can anyone comment on how to make the rows expanded by default, and which events to use to make the IsExpandable work as binding occurs?
Lynne
Top achievements
Rank 1
 answered on 08 Nov 2011
5 answers
396 views
Looking at the documentation for the RibbonView and RibbonButton, I see:

In order to create a command you have to create a static read-only instance ofTelerik.Windows.Controls.RoutedUICommand and then add execute and you can execute event handlers to theTelerik.Windows.Controls.CommandManager class.

Is this seriously the only binding implementation that the RibbonButton supports?! Can't we simply bind the button to an ICommand? Forcing the ugly, complicated implementation of a static read-only RoutedUICommand can't be the only way.

-Greg
Greg
Top achievements
Rank 1
 answered on 08 Nov 2011
1 answer
103 views
FYI: Observation with a grid with some dummy data: About 30 appointments with grouping (20 Employees). Switching from week to day view by clicking on the day switches immediately.

Now, when I go to month view and click on a date to quickly jump back to day view, the CPU spikes (not fully maxed out) for about 10 seconds, the UI locks up and RAM usage goes up 200 MB. Memory is eventually garbage collected, but a there seems to be a serious flaw in the implementation.
Rosi
Telerik team
 answered on 08 Nov 2011
1 answer
630 views
I want to use change theme function, but I found that the background color of stackpanel will not change with theme setting. The default background color of stackpanel only act when first app start, then we change the theme, it does not change its color.
The code is :
<Window x:Class="MainWin.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        Title="MainWindow" Height="350" Width="525">
 
    <telerik:RadDocking x:Name="radDocking" HasDocumentHost="False" AllowUnsafeMode="True">
 
        <telerik:RadSplitContainer InitialPosition="DockedTop" Height="50" Orientation="Vertical">
            <telerik:RadPaneGroup>
                <telerik:RadPane PaneHeaderVisibility="Collapsed">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition></RowDefinition>
                            <RowDefinition></RowDefinition>
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition></ColumnDefinition>
                            <ColumnDefinition></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" x:Name="Part1">
                            <telerik:RadButton Content="Office_Blue" Width="100" Height="30" Click="RadButton_Click"/>
                            <telerik:RadButton Content="Expression_Dark" Width="100" Height="30" Click="RadButton_Click"/>
                        </StackPanel>
                        <StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch"  Grid.Row="1" Grid.Column="0"   x:Name="Part2" >
                            <Label Content="Test1" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"/>
                        </StackPanel>
                        <StackPanel Grid.Row="1" Grid.Column="1">
                            <telerik:Label Content="Label 2"  HorizontalAlignment="Center" x:Name="Part3"/>
                        </StackPanel>
                    </Grid>
                </telerik:RadPane>
            </telerik:RadPaneGroup>
        </telerik:RadSplitContainer>
    </telerik:RadDocking>
</Window>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Telerik.Windows.Controls;
 
namespace MainWin
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            StyleManager.ApplicationTheme = new Expression_DarkTheme();
            //StyleManager.ApplicationTheme = new Office_BlueTheme();
            InitializeComponent();
        }
 
        private void RadButton_Click(object sender, RoutedEventArgs e)
        {
            RadButton btn = sender as RadButton;
            if (btn.Content.ToString() == "Office_Blue")
            {
                SetGlobalTheme(new Office_BlueTheme());
            }
            else
            {
                SetGlobalTheme(new Expression_DarkTheme());
            }
        }
 
 
        public static void SetGlobalTheme(Theme theme)
        {
            StyleManager.ApplicationTheme = theme;
 
            foreach (Window w in Application.Current.Windows)
            {
                SetThemeToVisualObject(w);
            }
        }
   
        public static void SetThemeToVisualObject(DependencyObject myVisual)
        {
 
            foreach (object o in LogicalTreeHelper.GetChildren(myVisual))
            {
                if (o is FrameworkElement)
                {
                    if (o.GetType().AssemblyQualifiedName.StartsWith("Telerik.Windows.Controls"))
                        StyleManager.SetTheme((FrameworkElement)o, StyleManager.ApplicationTheme);
 
                    SetThemeToVisualObject((FrameworkElement)o);
                }
            }
        }
    }
}
In the MainWindow() constructor, if we use 
StyleManager.ApplicationTheme = new Expression_DarkTheme();
then we start the app, we will find the StackPanel is dark,
However, if we use
StyleManager.ApplicationTheme = new Office_BlueTheme();
the StackPanel is white.

Click button in UI will not affect the background of Stackpanel.

How to solve this?

Pana
Telerik team
 answered on 08 Nov 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?