We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Custom context menu binding to ChartAreaCommands

Hi,
How should I bind a context menu item in a chart area to one of the ChartAreaCommands?

Please find attached a sample project. The problem is that my menu item 'Zoom in' remains disabled.

Thanks in advance,
wk



SyncFusionChartContextMenu_c7e93b34.zip

3 Replies

SS Sujitha S Syncfusion Team September 27, 2010 08:25 AM UTC

Hi Wk,

Sorry for delaying the udpate.

CommandBinding inside the context menu is possible only if we give focus to the Menu Item.

I have added the link about the command binding inside the context menu for your reference.

http://stackoverflow.com/questions/911904/commandbinding-in-window-doesnt-catch-execution-of-command-from-contextmenu

I have also created a simple sample, Please find the attached sample.

Regards
Sujitha S





20100518_ChartFull_23248889.zip


WK Willem Kaal October 8, 2010 02:33 PM UTC

Hi Sujitha,
Thank you for your answer.
However, in the given example, I'd expected the ZoomIn command (static in ChartAreaCommands) to handle the zooming.
In the example, the method CommandBinding_Executed (in code behind) handles it...

I am trying to get the ChartAreaCommand.ZoomIn command to do the work, without the need to write any code behind myself.
Maybe it is my misunderstanding of how to use the ZoomIn static command?

Regards,
Wk




SS Sujitha S Syncfusion Team October 14, 2010 01:17 PM UTC

Hi Wk,

Thanks for your interest in Syncfusion product.

CommandBinding inside the ContextMenu item is possile only if we give focus to the Menu item.

So, I have used the alternative way of CommandBinding_Executed method to achieve your reuqirement.

Let me know, if you have any queries.

Regards,
Sujitha S


Loader.
Live Chat Icon For mobile
Up arrow icon