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
- bbmat asked 8 years ago
- You must login to post comments
Hi there,
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!
Best regards,
Yuriy
- Yuriy Zadereckii answered 8 years ago
- last edited 3 weeks ago
- Thank you @Yuriy, though I wonder how I would go about implementing this. “Annotations” of SciChartSurface is already data-bound to my view model and on the other hand my legend must be declared and defined within xaml. I know WPF allows “CompositeCollections” but this idea does not seem applicable here. Any ideas how to get around this issue? Thanks a lot.
- You must login to post comments
Please login first to submit.