Pre loader

Serialize or Save contents of AnnotationViewModel MVVM Example

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 am using this example to to MVVM Annoations

WPF Axis Binding and Annotations Binding

I would like to save user drawn annotation . I was able get the user Annotation into

AnnotationViewModels = new ObservableCollection();

But now I can’t serialize as mentioned in this post
https://www.scichart.com/questions/wpf/is-there-a-way-to-serialize-just-annotations

any way to serialize IAnnotationViewModel or convert IAnnotationViewModel to IAnnotation so I can serialize the AnnoationCollection.

Please guide

thanks

Version
8.6.0.28199
  • Praveen D
    Clarification Assuming AnnotationViewModels = new ObservableCollection(); I meant serialize AnnotationViewModels or convert AnnotationViewModels to AnnotationCollection Also how to deserialize back to correct AnnotationViewModels thanks
  • You must to post comments
0
0

Hi Praveen,

Thanks for your inquiry.

SciChart supports serialization of the entire SciChartSurface to XML.
You can find more details in the following documentation article:
SciChart WPF Documentation – Serialization _ WPF Chart Documentation

However, serialization of chart parts (e.g., only Annotations) and ViewModels is not supported out of the box.
We can recommend implementing serialization of ViewModels on your side though.

Kind regards,
Lex, SciChart Technical Support Engineer

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.