These are chat archives for oxyplot/oxyplot

24th
Oct 2014
wuZheng
@wuZheng
Oct 24 2014 20:19
Hey objo, I'm new to OxyPlot and I'm porting a custom UserControl that formerly incorporated MSChart over to OxyPlot and one of the first few things I needed to do was create a custom Annotation. The UserControl in question relies on users being able to move (done), resize (done), select (done), and deselect (not done) the Annotations visible on the plot. I was wondering if there was an easy way for the plot to detect whether or not the mousedown event occurred over any of the annotations on the screen. I say easy because my current solution involves foreach'ing through all the annotations, choose specifically the type of my custom annotation, and doing each annotation's HitTest, but this doesn't seem to work (throws a NullReferenceException, but the plot isn't null, the Annotation itself isn't null, none of the sub annotations that make up this custom annotation are null either...), thanks in advance!
wuZheng
@wuZheng
Oct 24 2014 20:29
I guess a little more context is necessary, selection is done because I can capture the mouseevents over the specific annotation and manually call this.Select(), and I guess because I catch that in the parent control when switching between active annotations, in effect I have partial deselection, whats not working is deselecting the annotation when you click anywhere else on the plot that is not any other annotation.