Skip to content

Button in Tracker? #1981

Answered by redundancer
redundancer asked this question in Q&A
Feb 14, 2023 · 2 comments · 17 replies
Discussion options

You must be logged in to vote

With a lot of help from @VisualMelon I finally managed to create a tracker with working buttons inside. To summarize:

  1. To avoid closing of the tracker after release of the left mouse button I created a TrackerManipulator:
internal class StaysOpenTrackerManipulator : OxyPlot.TrackerManipulator
  {
      public StaysOpenTrackerManipulator(IPlotView plotView) : base(plotView)
      {
          Snap = true;
          PointsOnly = true;
      }

      public override void Started(OxyMouseEventArgs e)
      {
           /*
             * Close tracker when clicking. This avoids wrong shaping of the tracker
             * in case it's text is of different length for different points. Additionally,

Replies: 2 comments 17 replies

Comment options

You must be logged in to vote
16 replies
@redundancer
Comment options

@VisualMelon
Comment options

@redundancer
Comment options

@VisualMelon
Comment options

@redundancer
Comment options

Comment options

You must be logged in to vote
1 reply
@VisualMelon
Comment options

Answer selected by redundancer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants