SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components
How to programmatically add Scrollbars to MVVM instantiated axes?
I added DateTimeAxisViewModel and NumericAxisViewModel to my code. That works from so far. A way to add scrollbars i couldnt find a some tries.
Are there some ways to get this done? Maybe change the templates of the axes or the chart?
That’s a good question,
We don’t have a mechanism to do it built in to the API, but you could quite easily write a custom style to enable scrollbars on the axis in MVVM.
I have created an example for you and uploaded to our Sandbox on github.
The sample is found at Sandbox/UsefulExamples/Examples/ScrollbarMvvmAxis/ScrollbarMvvmAxis.xaml
SciChart SDK 184.108.40.20673 – SC-WPF-SDK-PRO Trial
Thank you for the quick response. But i am afraid i am still stuck.
A very exact replication of the example integrated in my code, throws “Unable to cast object of type ‘System.String’ to type ‘System.Windows.Style’.” exception. It isnt catched and crashes to the unhandled exception event handler.
For the custom numeric it is like that and if i step past the exception the style is applied. For DateTimeAxis is isnt working like that at all. Instead directly followed with an: “System.InvalidOperationException”, like “The application is already execution the dispatcher” .
That first unhandeld exception can’t be good anyway.
Maybe because i declare the SciChartSurface in a DataTemplate?
Maybe it is an interaction with the Xceed WPF Tools Avalon Dock?
Please login first to submit.