-
Notifications
You must be signed in to change notification settings - Fork 438
Replies: 1 comment · 3 replies
-
you can just serialize and deserialize the collection of points. You don't need to use stream in this case |
Beta Was this translation helpful? Give feedback.
All reactions
-
@VladislavAntonyuk Thanks for the response. I'm trying the way you suggested: View:
ViewModel:
Save signature: Load signature: But in order for this to work as I expect, I need to set the DrawingView Lines Binding to Mode=TwoWay. Whenever I do that, I'm getting this error:
The only way I'm not getting this error is by setting my DrawingView Lines Binding to Mode=OneWayToSource. But, if I do that, would not be possible to load the signature from the view model. |
Beta Was this translation helpful? Give feedback.
All reactions
-
The problem is not in binding but in Deserialization, that returns you null |
Beta Was this translation helpful? Give feedback.
All reactions
-
@VladislavAntonyuk Was my fault, I had to initialize the binding to an empty I also double checked I was saving/loading the drawing properly. Still unable to make DrawingView show the loaded drawing. Looks like DrawingView is ignoring external changes to its binding |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I would like persistently save the state of my drawing view. I know I can get the Stream from the drawn lines, but I'm wondering if I could save this stream into a file (byte array format) and later on, read this file, and load the drawing view with the content.
I haven't been able to find a way to go from the Stream back to
ObservableCollection<IDrawingLine>
Beta Was this translation helpful? Give feedback.
All reactions