Error: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "WinRTXamlToolkit.Controls.DataVisualization.Properties.Resources.resources" was correctly embedded or linked into assembly "WinRTXamlToolkit.Con

Jan 25, 2013 at 8:16 PM

Hi, first of all a big thank you for this great toolkit!!

I get the following problem in my XAML:

Error    1    Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "WinRTXamlToolkit.Controls.DataVisualization.Properties.Resources.resources" was correctly embedded or linked into assembly "WinRTXamlToolkit.Controls.DataVisualization" at compile time, or that all the satellite assemblies required are loadable and fully signed.

I am using 2 NuGet packages:

  <package id="winrtxamltoolkit" version="1.3.5.3" targetFramework="winrt45" />
  <package id="WinRTXamlToolkit.Controls.DataVisualization" version="1.3.5.3" targetFramework="winrt45" />

Is there a fix for this available?
Thank you!
Coordinator
Jan 25, 2013 at 8:36 PM

Hi,

I have seen something like this reported before, but I could not reproduce it. Is your OS set to a locale that is different than en-us? It might be a problem with the configuration of the NuGet package. If it is - you can try including the full source of the library in your solution instead of the NuGet package to see if that helps.

Jan 25, 2013 at 8:50 PM

Hi,

wow! thank you for the fast response. Hmm my display language, date/currency format is EN-US. As input languages I have english and german.

Jan 31, 2013 at 9:09 PM
Hi, in my case, debugging, i notice that the exception occur when no custom Title is specified to the LineSeries chart (WinRTXamlToolkit.Controls.DataVisualization.Charting.LineSeries). The exceptions occur in Resources.Designer.cs, line 277 of WinRTXamlToolkit.Controls.DataVisualization project. If custom Title is set, the exception disappear.

Hope this help!
Coordinator
Jan 31, 2013 at 9:39 PM
Thanks! That's very helpful!
Mar 26, 2013 at 5:31 AM
In case anyone still have problem with this, I did managed to solved it, somehow. I tried setting the "Title" and re-adding the reference, but nothing worked, so I just give up on the XAML entirely. I dynamically build the series on the C# file, following this guide under "Building Stacked Line Chart":

http://sharepointdragons.com/2011/12/12/about-the-chart-controls-in-the-silverlight-5-toolkit/

The code for building the chart with two line series embedded in it looks like this:

chart1.Title = “Visitors/days of week in Stacked Lines”;

var b1 = new StackedLineSeries();
b1.Name = “days”;
var s1 = new SeriesDefinition();
b1.SeriesDefinitions.Add(s1);
s1.Title = “Visitors of web site 1/Days of the Week”;
s1.ItemsSource = days;
s1.IndependentValueBinding = new Binding(“Day”);
s1.DependentValueBinding = new Binding(“NumberOfVisitors”);

var s2 = new SeriesDefinition();
b1.SeriesDefinitions.Add(s2);
s2.Title = “Visitors of web site 2/Days of the Week”;
s2.ItemsSource = days2;
s2.IndependentValueBinding = new Binding(“Day”);
s2.DependentValueBinding = new Binding(“NumberOfVisitors”);

chart1.Series.Add(b1);

NOTE: The ItemSource days and days2 are the sources to be plot, predefined as can be seen in the link.

When I implemented this, I also figured that need to adjust things regarding the Binding. Somehow, something like this

s1.IndependentValueBinding = new Binding(“Day”);

is not valid in my Window Store App project returning the error: "'Windows.UI.Xaml.Data.Binding' does not contain a constructor that takes 1 argument", so I build the binding like this:

Binding testBinding = new Binding();
//angleBinding.Source = phaseItems; --> not necessary. will cause error if bind source, since we already specify in s1.ItemSource
testBinding.Path = new PropertyPath("Day");
s1.IndependentValueBinding = testBinding;

So in the end the code you need to build a line chart will look like this:

chart1.Title = “Visitors/days of week in Stacked Lines”;

var b1 = new StackedLineSeries();
b1.Name = “days”;
var s1 = new SeriesDefinition();
b1.SeriesDefinitions.Add(s1);
s1.Title = “Visitors of web site 1/Days of the Week”;
s1.ItemsSource = days;

Binding testBinding = new Binding();
testBinding.Path = new PropertyPath("Day");
s1.IndependentValueBinding = testBinding;

Binding testBinding Two= new Binding();
testBindingTwo.Path = new PropertyPath("NumberOfVisitors");
s1.DependentValueBinding = testBindingTwo;

//omitted s2 due to similar concept

chart1.Series.Add(b1);


I haven't tried all possible options of dynamically create the chart yet, but I'm sure most of them are valid. If not, then I hope other options when using XAML will not contain error of a similar nature. Hope this helps! I spend so much time figuring this out I hope no one will ever have to go through that again.