Pre loader

System.NullReferenceException in Abt.Controls.SciChart.Wpf.dll error


I’m trying your example Multi-Pane Stock Charts. And if I use your variant of code it works perfectly. To start your variant I use this code:

var wnd = new Window1();
var test = new CreateMultiPaneStockChartsViewModel();
wnd.Chart.ChartPanes = test.ChartPaneViewModels;

where wnd.Chart.ChartPanes is ObservableCollection of BaseChartPaneViewModel and is binded to SciChartGroup ItemsSource.
But if I try add paneviewmodel via Add method:

var wnd = new Window1();
var test= new CreateMultiPaneStockChartsViewModel();
foreach (var p in test.ChartPaneViewModels)

In Window1 I subscribe on ChartPanes.CollectionChanged where I raise OnPropertyChanged event to update binding.
after adding second paneviewmodel I have error: System.NullReferenceException in Abt.Controls.SciChart.Wpf.dll. How Can I add chart panes via Add method in my case?

Second question is in your example doesn’t work correctly panes hiding. If I hit triangle button to hide for example MACD pane it only moves down under scrollbar but does not hide. And if I next hide volume pane it hides but with scrollbar. How to fix this bug?

  • You must to post comments

Here is simple example for first question (pane hiding doesn’t work well there too).

  • You must to post comments

For second question answer is I looked demo from your site:;component/Examples/IWantTo/CreateStockCharts/MultiPane/CreateMultiPaneStockCharts.xaml.
In my project lib version is older (3.4.1)
For first question I’ll try to make a simple project.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies