Pre loader

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

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

Hello,
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;
wnd.Show();

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)
        wnd.Chart.ChartPanes.Add(p);

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
0
0

For second question answer is I looked demo from your site: WPF Multi Pane Stock Charts example
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
0
0

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

Attachments
  • 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