-
|
Hi Scott. I know that version 5 is coming out soon. I would like to know if it will be possible to use MVVM in the future? At the moment, I cannot use your product because of this. |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
|
Hi @FoxTes, I'm glad you enjoy using this library! MVVM is a commonly used pattern for GUI environments, but ScottPlot was is designed to plot data onto bitmap images in console applications, so it does not use MVVM. User controls respond to mouse interactions and generate new bitmaps (giving the appearance of interactivity) but since the core of ScottPlot does not use MVVM, neither do the controls. This is a common question though so I'll add it to the FAQ I'm working on (#572) - thanks for raising it! What type of data are you trying to display in your application? I would be surprised to learn that there is something you cannot do because the ScottPlot controls do not use MVVM pattern. The demo application https://swharden.com/scottplot/demo shows how to display live updating data interactively, and its source code is in this repository. I'll close this issue for now, but feel free to respond or open it again if you have further questions! 👍 |
Beta Was this translation helpful? Give feedback.
-
|
I am using an application building with Prism. Of course, you can use behind code, but it will be more difficult. |
Beta Was this translation helpful? Give feedback.
-
This is a good summary of the current situation! It is possible to create a MVVM control for ScottPlot (and not use the control provided by the |
Beta Was this translation helpful? Give feedback.
-
Can you show an example?
I do not quite understand your idea. |
Beta Was this translation helpful? Give feedback.
-
The code below is a WinForms control for an interactive ScottPlot (the WPF control is similar). It is simple, only about 150 lines. My suggestion is that, if you really want a control that uses MVVM pattern, you can create one using this as a starting point.
I do not have an example, but I'll consider adding an example to the FAQ (#572, #412) because this is a common question 👍 |
Beta Was this translation helpful? Give feedback.
-
|
It's worked. Thank for example! |
Beta Was this translation helpful? Give feedback.
-
|
Hi all, Sorry for the belated comment, but I think it might still be helpful. EDIT: ScottPlot MVVM and Data Binding FAQhttps://swharden.com/scottplot/faq/mvvm |
Beta Was this translation helpful? Give feedback.
Hi all,
Sorry for the belated comment, but I think it might still be helpful.
This question already discussed in #494.
I use the solution described in #494 (comment) and find it quite convenient.
EDIT: ScottPlot MVVM and Data Binding FAQ
https://swharden.com/scottplot/faq/mvvm