i currently place my custom (templated) legend inside the Scichartsurface (via xaml).
How can I offer the feature to drag the legend with the mouse to any location on the surface? Please note that I also use mouse movements and clicks for several chart modifiers so most likely I would have to check whether the mouse is hovering over the legend when a left mouse click event is raised?
Could you please get me started with some ideas or thoughts as I am not sure how to approach this issue.
Thanks for your question. I would suggest placing your custom legend in a CustomAnnotation, which can be moved inside a SciChartSurface. You will need to declare the legend explicitly, not via a LegendModifier:
<SciChart:SciChartSurface.Annotations> <SciChart:CustomAnnotation CoordinateMode="Relative" X1="0" Y1="0" IsEditable="True"> <SciChart:CustomAnnotation.Content> <SciChart:SciChartLegend .../> </SciChart:CustomAnnotation.Content> </SciChart:CustomAnnotation> </SciChart:SciChartSurface.Annotations>
You can find more info about the SciChartLegend control in our FAQ.
Hope this helps!
Please login first to submit.