Right click on Legend

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
jval
Posts: 40
Joined: Mon May 04, 2015 1:46 pm

Right click on Legend

Post by jval » Mon May 18, 2015 1:10 pm

Hello all.
I've created handler for MouseUp (tried MouseClick too) event for Chart and show my custom context menu.
But I would like to show other context menu when I click on LegendBox.
I've created handler for ViewXY.LegendBox.MouseUp (tried MouseClick too) but:
in the first step I'm in handler for LegendBox
..and after that I'm in handler for Chart too :(
How can I raise event for Only Legend or to Cancel event to Chart (from Legend's handler).

Thank you in advance.

ArctionJari

Re: Right click on Legend

Post by ArctionJari » Tue May 19, 2015 8:00 am

You could set e.Handled = true in legend box's MouseUp event handler. This will prevent the event from being sent any further.

I would use chart's ContextMenu property instead. I.e. set chart's context menu directly to ContextMeny property and handle legend box's context menu with MouseUp event.

I hope this helps. :)

jval
Posts: 40
Joined: Mon May 04, 2015 1:46 pm

Re: Right click on Legend

Post by jval » Tue May 19, 2015 9:03 am

ArctionJari wrote:You could set e.Handled = true in legend box's MouseUp event handler. This will prevent the event from being sent any further.

I would use chart's ContextMenu property instead. I.e. set chart's context menu directly to ContextMeny property and handle legend box's context menu with MouseUp event.

I hope this helps. :)
Thank you I think it will help me.

Post Reply