Pre loader

How to get plot area length in MVVM

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

1
0

I need the length of the plot area in pixels. I don’t have access to SciChartSurface and it’s XAxis field. I have only ObservableCollection and my NumericAxisViewModel. Is it possible to get the length from them? Or what is the best way to get it in my case?

Version
5
Images
  • You must to post comments
0
0

The best way to do this would be to create some sort of attached behaviour which listened to the SizeChanged event on the SciChartSurface and injected the SciChartSurface.RenderSurface.ActualWidth into the ViewModel.

There’s an example of something similar here: https://stackoverflow.com/a/1083733/303612

Best regards,
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.