"Modern graphical interface (Metro) for Windows 8, WPF, Silverlight" for .net 4.0

I am looking for good chart control and found " Modern Graphical Interfaces (Metro) for Windows 8, WPF, Silverlight " This control looks very good, but I need it for Visual Studio 2010 and 4.0. The original source was written in Visual Studio 2012 and 4.5, so I tried to create a new project with class files. Everything works well. I can compile classes and debug through. But the result is an empty window. I do not know where the error is. The files are immutable, so I post several images:

working sample the working sample

copied example 4.0 copied 4.0 sample

Snoop working sample the working sample Snoop

copied 4.0 Snoop sample copied 4.0 sample snoop

+5
source
2

Metro ! , Windows 8 .net 4.5, Windows 7 .net 4.0 VS 2010. http://thusithamabotuwana.wordpress.com/2014/02/02/charting-with-wpf/, , .

+2

, VS2010. , DataContext ChartBase. , . , ChartBase.OnSeriesSourceChanged, LoadDataTemplate, , :

private void OnSeriesSourceChanged(IEnumerable oldValue, IEnumerable newValue)
{
    this.Series.Clear();
    if (newValue != null)
    {
        foreach (object item in newValue)
        {
            if (SeriesTemplate != null)
            {
                ChartSeries series = LoadDataTemplate<ChartSeries>(SeriesTemplate, item);
                if (series != null)
                {
                    // set data context
                    series.DataContext = item;
                    this.Series.Add(series);
                }
            }
        }
    }
    UpdateGroupedSeries();
}

private static T LoadDataTemplate<T>(DataTemplate template, object dataContext)
    where T : FrameworkElement
{
    DependencyObject element = template.LoadContent();
    T view = element as T;
    view.DataContext = dataContext;

    var enumerator = element.GetLocalValueEnumerator();
    while (enumerator.MoveNext())
    {
        var bind = enumerator.Current;

        if (bind.Value is BindingExpression)
        {
            view.SetBinding(bind.Property, ((BindingExpression)bind.Value).ParentBinding);
        }
    }

    return view;
}

-, , Generic.xaml. , De.TorstenMandelkow.MetroChart.WPF/Themes. BaseChartStyle.

0

All Articles