ScottPlot5: WpfPlot as CustomControl#2565
Merged
swharden merged 4 commits intoScottPlot:mainfrom Apr 6, 2023
Merged
Conversation
- update ScottPlot5-wpf.slnf to add missed ScottPlot.OpenGL project - WpfPlot use now a template and is based on System.Windows.Controls.Control
Member
|
@KroMignon this is fantastic, thanks so much! I'll make a few small changes to improve mirroring between the WPF and WinForms controls and merge this into main in a few minutes 🚀 |
Member
I agree! This strategy was originally created so users could customize the interactivity (swapping what mouse buttons do, changing zoom and pan behavior, etc) but I think the API can benefit from improvement in the future |
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose:
Use Control as base class for WpfPlot instead of UserControl to enable customization. (cf #2509).
Changes:
ScottPlot5-wpfSolution Filter to add missedScottPlot.OpenGLprojectWpfPlotuse now a template and is based onSystem.Windows.Controls.Control, very close to ScottPlot4 version (Convert WpfPlot to CustomControl #2526).I am not totally happy with this control. The method
WpfPlot::Replace()has a bad taste to me. It looks weird as the control hold by the newInteractioninstance my be another one as the control to which it will be set.This looks very error prone to me 💣