There should be no difference between the two - if you call the FillSampleChartData from the class itself or from another class. I have prepared a simple project to demonstrate this works correctly. The chart is originally empty. When I click the button, the chart gets properly populated. I have also attached a snapshot of the output it produces before and after the button click.
I am using mvvm model. 1. In view i have chart 2. In view model i have logic.
In my code i am creating object for my chart class in view model. i hope for this only data is not binding to chart.
Can you please create object for sample class and call the FillSampleChartData() method.( I know here no need to create object)
But i am curious how it will work with new object .
using your code : // In MainPage.xmal.cs can you create object for sample class,
sl_Chart_630076.Sample s= new Sample();
answered on 20 Nov 2012, 08:07 AM
I see no point into doing this test. If I create a new instance of Sample - it is not visualized anywhere on the screen, so it wouldn't matter if I call the method or not. If you have a specific question about our controls let us know how we can help.